#
Command Line Parameters
You can also access the functionality of .NET Reactor through command-line parameters.
Attention
In most cases you don't need to study this page as you can easily create the parameters through the .NET Reactor menu item 'Command-line'>'Generate Command-line'.
General Arguments | Description |
---|---|
-file [file] | Filename of the main assembly. |
-icon [file] | If you want to use a different icon for an application you need to set the path for the icon here. |
-licensed | In case .NET Reactor is NOT running as full version no files will be protected and .NET Reactor will return the return/exit code 101. |
-logfile [file] | Writes all important events (successful protection and error messages) into the specified file. |
-masterkey [text] | Master Key (used ONLY for Lock settings). |
-masterkeyfile [file] | Path to a Master Key file (used ONLY for Lock settings). |
-embed [1|0] | Embed assemblies. [1] = Enable [0] = Disable |
merge [1|0] | Merge assemblies. [1] = Enable [0] = Disable |
-mono [1|0] | Enable this option if your assembly targets Mono. [1] = Enable [0] = Disable |
-project [file] | Path to a .NET Reactor project file (contains the Master Key as well). |
-q[uiet] | Specifies quiet mode; suppresses the display of success messages |
-files [lib/lib] | Please define additional files here. If '-embed 1' or '-merge 1' is set, the additional files are embedded into your application or they are directly merged with the main assembly. In case neither '-embed 1' nor '-merge 1' is set the Additional Files (*.dll and *.exe files only) are protected separately. [library / library] for example "C:\lib1.dll/C:\lib2.dll/C:\lib3.dll" |
-snkeypair [file] | Strong Name Key Pair file (.snk/.pfx) |
-snpassword [text] | Strong Name Key Pair file password |
-targetfile [file] | Target File should be left blank, unless you want to specify the location of the protected output. |
Arguments | |
1. General Settings |
|
Application Settings |
|
Automatic Exception Handling |
|
-exception_handling [1|0] | If you don't want your protected application to catch exceptions automatically, set this option to False("0"). [1] = Enable [0] = Disable |
Compression |
|
-compression [1|0] | If set to True("1"), .NET Reactor will compress your .exe file and embedded files saving space on disk and bandwidth if you provide your code for internet download. [1] = Enable [0] = Disable |
Show Loading Screen |
|
-showloadingscreen [1|0] | Enable/Disable the LoadingScreen [1] = Enable [0] = Disable |
Digital Certificate |
|
PVK Filename |
|
-pvkfile [file] | Private Key File. |
PFX/PVK Password |
|
-pvkpassword [text] | Private Key File Password. |
PFX/SPC File Name |
|
-spcfile [file] | Software Publisher Certificate File. |
Enable Visual Styles |
|
-visualstyles [1|0] | If you wish to use visual styles (which are a feature of Windows Xp and Windows Vista), you will need to set this option to True. If set to false, any attempt in your assembly to enable visual styles will be ineffective. [1] = Enable [0] = Disable |
Force Admin Privileges |
|
-admin [1|0] | If your software requires administrator privileges under Windows Vista/7 you need to set this option to true. In this case a consent dialog is shown in Windows Vista/7. [1] = Enable [0] = Disable |
Merge Assemblies |
|
-merge [1|0] | Merge Assemblies [1] = Enable [0] = Disable |
Pack Assemblies |
|
-embed [1|0] | Embed Assemblies [1] = Enable [0] = Disable |
Strong Name |
|
KeyPair File |
|
-snkeypair [file] | Strong Name Key Pair file (.snk/.pfx) |
KeyPair Password |
|
-snpassword [text] | Strong Name Key Pair file password |
Target File |
|
-targetfile [file] | .NET Reactor creates a new file containing your protected assembly. This field allows you to specify the path and name of that file. If left blank, .NET Reactor will write the new file to a default location. |
2. Protection Settings |
|
Anti Tampering |
|
-antitamp [1|0] | This option prevents your protected assembly from being tampered by hacker tools. [1] = Enable [0] = Disable |
Control Flow Obfuscation |
|
-control_flow_obfuscation [1|0] | Enable "Control Flow Obfuscation" to mangle program flow, making it extremely difficult for humans to follow the program logic. Most decompiler are unable to decompile control flow obfuscated methods. [1] = Enable [0] = Disable |
Control Flow Obfuscation Level |
|
-flow_level [1/2/3/4/5/6/7/8/9] | This option enables you to control the level of Control Flow Obfuscation. While "1" represents the lowest level of Control Flow Obfuscation, "9" represents the strongest level. |
Native EXE File |
|
-nativeexe [1|0] | .NET Reactor is able to generate a native x86 EXE file stub for your application. This way it is not possible to directly open your protected application in a decompiler. The decompiler recognizes your protected application as a native EXE file. [1] = Enable [0] = Disable |
NecroBit Protection |
|
-necrobit [1|0] | Enable this option to use NecroBit protection. NecroBit can be used with both Application and Library protection mode. In Library protection mode an additional file will be created. [1] = Enable [0] = Disable |
NecroBit/Reflection Compatibility Mode |
|
-necrobit_comp [1|0] | If you have problems with reflection on NecroBit protected libraries you should enable this option. [1] = Enable [0] = Disable |
Obfuscation |
|
Create Mapping File |
|
-mapping_file [1|0] | Enable Mapping file to create a file which cross reference unobfuscated names with obfuscated ones, which is used by the Stack Trace Deobfuscator. [1] = Enable [0] = Disable |
-obfuscation [1|0] | Enable this to obfuscate all non public class and member names. [1] = Enable [0] = Disable |
Incremental Obfuscation |
|
-incremental_obfuscation [1|0] | If you want .NET Reactor always to generate the same obfuscation strings for your type and member names, you need to enable this option. [1] = Enable [0] = Disable |
Exclusions |
|
-exclude_enums [1|0] | Exclusions - Enums [1] = Enable [0] = Disable |
-exclude_events [1|0] | Exclusions - Events [1] = Enable [0] = Disable |
-exclude_fields [1|0] | Exclusions - Fields [1] = Enable [0] = Disable |
-exclude_methods [1|0] | Exclusions - Methods [1] = Enable [0] = Disable |
-exclude_properties [1|0] | Exclusions - Properties [1] = Enable [0] = Disable |
-exclude_types [1|0] | Exclusions - Types [1] = Enable [0] = Disable |
-exclude_serializable_types [1|0] | Disable this option to prevent serializable types from obfuscation. [1] = Enable [0] = Disable |
-regularexpressions [text] | Exclusions - Regular Expressions |
Obfuscate Public Types |
|
-obfuscate_public_types [1|0] | Enable this to obfuscate all type and member names in an assembly. [1] = Enable [0] = Disable |
Use Uprintable Characters |
|
-unprintable_characters [1|0] | Unprintable characters uses unprintable strings to obfuscate type and member names, but cannot be used if your assembly must run as safe code. [1] = Enable [0] = Disable |
Public Types Internalization |
|
-internalization [1|0] | If enabled, .NET Reactor will convert all public types of an application into internal ones. This way the accessibility of types and members is reduced. [1] = Enable [0] = Disable |
Filter |
|
-internalization_filter [text] | Define types you want to keep public or make internal. Example: -internalization_filter "[internal];[public][MyAssembly]MyNamespace.;[internal][MyAssembly]MyNamespace2.MyType" |
Pre-JIT Methods |
|
-prejit [1|0] | In combination with the Native EXE File feature and NecroBit, .NET Reactor is able to convert managed methods into REAL x86 native code. Only methods which doesn't affect the runtime and platform behavior (mostly small methods like property getters/setters...) are converted into native code. By nature this feature has an built-in protection against assembly modification. [1] = Enable [0] = Disable |
Resource Encryption & Compression |
|
-resourceencryption [1|0] | Enable this option to compress and encrypt embedded resources. [1] = Enable [0] = Disable |
Compression Method |
|
-resourcecompression [value] | Choose a compression method. 'Fastest' offers poor compression but it is very quick. 'MaxCompression' offers best protection but it is the slowest compression method. 'NoCompression' doesn't apply compression at all. [nocompression] = No compression will be applied [fastest] = Offers poor compression but it is very quick [fast] [normal] [good] [max] = Offers best protection but it is the slowest compression method Example: -resourcecompression good |
String Encryption |
|
-stringencryption [1|0] | String Encryption disguises internalized text, making it all the more difficult to decipher the interaction of your CIL. [1] = Enable [0] = Disable |
Strong Name Removal Protection |
|
-antistrong [1|0] | This option enables anti Strong Name removal techniques which prevents your protected assembly from being tampered by hacker tools. Warning, this option can impact the runtime performance of your protected assembly! [1] = Enable [0] = Disable |
Anti ILDASM/Suppress Decompilation |
|
-suppressildasm [1|0] | Enable this option to suppress disassembly to IL using the ildasm.exe tool. Even if this option it set to FALSE your source code is still secure! [1] = Enable [0] = Disable |
3. Lock Settings |
|
Expire When All Expired |
|
-licensing_behaviour[1|0] | When set to True("1") causes the expiration of the assembly only when all other enabled locks have expired. When set to False the assembly expires when any one of the locks expires. [1] = Enable [0] = Disable |
Inbuilt Lock - Eveluation Period |
|
-evaluationenable [1|0] | The Evaluation period lock enables the creation of trial versions of your application, limiting the use of your trial in a variety of ways(Trial or Runtime). [1] = Enable [0] = Disable |
Evaluation Type |
|
-evaluationtype [trial | runtime] | Choose between Trial and Runtime [trial] = Trial [runtime] = Runtime |
Time |
|
-time [number] | Specify the number of days or minutes for the evaluation period. |
Dialog |
|
-showevaluationperiodscreen [0|1] | Enable this to show a message screen when evaluation period is expired. |
Message |
|
-evaluationmessage [text] | Evaluation period expired message. |
Inbuilt Lock - Expiration Date | |
-expirationdate_enable [1|0] | The Expiration Date lock allows you to specify the exact date on which your application should expire. [1] = Enable [0] = Disable |
Expiration Date |
|
-expirationdate [y/m/d] | Choose a day. Your inbuilt license will be valid up to this day. After this day your customer will need a new license file.[year/month/day] for example '2023/1/15' |
Dialog |
|
**-showexpirationdatescreen **[1|0] | Specifies whether a dialog box should be displayed to the user when the Expiration Date is reached. |
Message |
|
-expirationdatemessage [text] | Message |
Inbuilt Lock - Number Of Uses |
|
-number_of_uses_enable[1|0] | This lock, if enabled, causes your application to expire after the specified number of uses.[1] = Enable[0] = Disable |
Uses |
|
-number_of_uses [number] | Specify the number of times the user can run your application before it expires. |
Dialog |
|
-showenumberofusesscreen[1|0] | Specifies whether a dialog box should be displayed to the user when your application has been used the specified number of times. [1] = Enable [0] = Disable |
Message |
|
-expirationdatemessage [text] | Message |
License Not Found Screen |
|
-shownotfoundscreen [1|0] | Enable/Disable Screen [1] = Enable [0] = Disable |
Message |
|
-invalidlicensemessage [text] | The text of the message which is issued when a license file is not found (if "Run Without License" is set to false), is found but is corrupt or otherwise invalid. |
Max Number Of Instances |
|
-number_of_instances_enable[1|0] | The max number of instances lock allows you to specify the maximum number of copies of your application the user is allowed to start at the same time. Please note that exceeding the specified number of instances does NOT cause your application to expire. [1] = Enable [0] = Disable |
Instances |
|
-number_of_instances [number] | The maximum number of instances. |
Dialog |
|
-numberofinstancesscreen[1|0] | Specifies whether a dialog box should be displayed to the user when they attempt to run more than the specified number of instances of your application. [1] = Enable [0] = Disable |
Message |
|
-numberofinstancesmessage [text] | Message |
Nag Screen |
|
-shownagscreen [1|0] | Enable/Disable NagScreen [1] = Enable [0] = Disable |
Message |
|
-nagmessage [text] | Here you can set the message for the nag screen. |
XDays |
|
-xdays [number] | .NET Reactor can either display the nag screen every time the application is started (in which case set the value of this option to -1), or a specified number of days before the end of the Evaluation Period or Expiry Date. |
Run Another Process After Expiration |
|
-run_another_process [text] | Opens or launches another application, file, or web site upon expiration. Usually used to send evaluation users to a web page. |
Run Without License File |
|
-run_without_licensefile [1|0] | Set to false(0) to require a valid license for operation. If true, enabled Inbuilt Locks are honored. If a valid license file is found the Inbuilt Locks settings are overriden with the license file settings. [1] = Enable [0] = Disable |
Shutdown Process After Expiration |
|
-shutdown_process [1|0] | Terminates the running process upon expiration. [1] = Enable [0] = Disable |
Static License FileName |
|
-staticlicensefilename [filename] | Specifies a license file name or extension (*.myextension). Leave blank to allow .NET Reactor to determine a *.license file name from your assembly name. To avoid conflicts with optional methods of extending license behavior, binary .NET Reactor licenses do not use the .LIC extension reserved to .NET license classes. |
V3 Licensing Mode |
|
-v3mode[1|0] | .NET Reactor v3.x uses a new encryption technique which is not backward compatible with previous versions of .NET Reactor. Set this option to True to use .NET Reactor v3 license encryption technique, or False to use the V2.x compatible encryption method. |
4. Dialog Settings |
|
Dialog Box Interface |
|
-dialogbox_interface [file] | Uses a customizable dialog box you may build with the SDK. Please set the FullName of your Dialog Box here(e.g. MyNamespace.MyDialogBox). Please check the SDK for more information. |
Dialog Caption |
|
-messagecaption [text] | This is the title of all message forms which can be shown. |
Gradient Color Begin |
|
-gradcolorbegin [r/g/b] | Gradient Color of the message windows.<red/green/blue> for example '212/15/128' |
Gradient Color End |
|
-gradcolorend [r/g/b] | Gradient Color of the message windows.<red/green/blue> for example '212/15/128' |
#
Example Combinations:
dotNET_Reactor.Console.exe -file "c:\testapp.exe"
dotNET_Reactor.Console.exe -file "c:\testlib.dll" -licensed
dotNET_Reactor.Console.exe -project "c:\projx.nrproj"
dotNET_Reactor.Console.exe -project "c:\projx.nrproj" -masterkeyfile "c:\masterkey.mkey"
dotNET_Reactor.Console.exe -file "c:\testapp.exe" -project "c:\projx.nrproj"
dotNET_Reactor.Console.exe -file "c:\testapp.exe" -project "c:\projx.nrproj" -q -licensed
dotNET_Reactor.Console.exe -file "c:\testapp.exe" -evaluationenable 1 -evaluationtype trial -time 14
dotNET_Reactor.Console.exe -file "c:\testapp.exe" -showloadingscreen 0