VS2017 MS Installer project with Protection

VS2017 MS Installer project with Protection

Recently encounter a strange issue for MS Installer project with Protection (such as Obfuscation), the post build of original project works fine, it protected the exe and DLL files it generated. However, the MS Installer project still pick up the unprotected version of exe, after installation, in the installed folder, DLL files are protected, but exe file is not protected.

The development environment is as follow:
- Windows 10
- Visual Studio Enterprise 2017 version 15.9.5

After a few hours of try and error, I finally work out the following solution:

1. In VS Installer project from “Solution Explorer” pane, click “File System Editor”
2. In left pane “File System on Target Machine”, choose “Application Folder”, find the “Primary output from ### (Active)”, right click mouse
2. Click “ExcludeFilter”, then click “Add Filter”
3. In the text box below “New filter:” enter the exe file name, click Ok
4. Back to “Application Folder”, right click mouse, then click “Add\File...”
5. From the file browser select the protected exe file
6. In VS Installer project from “Solution Explorer” pane, click “Custom Actions Editor”
7. Replace all the old “Primary output from ### (Active)” action items with the exe file in “Application Folder”
8. That’s all, remember to rebuild the Installer project

Comments

Popular posts from this blog

Error - vbe6ext.olb could not be loaded

Visual Studio $(TargetDir) macro is empty