How To: Apply Command-Line Application Protection with SLP Code Protector
Microsoft SLP Code Protector has a command-line application protection feature that integrates the protection of an application as part of a build process. This method of applying protection is very efficient when the application is in the development stage, and undergoing frequent changes.
Note: Command-line protection cannot be applied if a generic Permutation is used. You must first create a private Permutation.
To Create an SLP Code Protector Configuration File
- Open SLP Code Protector.
- Click the Project tab, and then click View.
- Add the modules, and select the methods you wish to protect. Define all necessary settings for the methods.
- The settings apply to the entire project, the application, and the methods selected for protection. Settings are displayed in the right portion of the page in the Project view. For more information about selecting the settings, refer to the SLP Code Protector User Guide.
- Click File, and then click Save Project As…
- Enter a file name with a .SLMCfg extension, for example, ProtectionSettings.SLMCfg. Click Save. This creates a configuration file called ProtectionSettings.SLMCfg.
To Apply Command-Line Protection Options
- To apply command-line protection options, you will run Microsoft.Licensing.ProtectCmd.exe with the configuration file you created earlier, as an argument. Microsoft.Licensing.ProtectCmd.exe is found at <drive>:\Program Files\Microsoft SLP Code Protector.
The default syntax for this command is:
Microsoft.Licensing.ProtectCmd.exe <Protection configuration file.SLMCfg>
- Type the following command at the prompt:
“%programfiles%\Microsoft SLP Code Protector\Microsoft.Licensing.ProtectCmd.exe” ProtectionSettings.SLMCfg
Important: In order for the protection to apply correctly, the location of the configuration file should not be changed relative to the protected and unprotected assemblies. If the configuration file is not stored on the same drive as the input assemblies, the complete physical path for the input as well as output directory is used within the configuration file, to reference these files.
What do you think about this topic? Send feedback!