Embedding a manifest file into a .exe created using wisescript


Article ID: 181094


Updated On:


Symantec Products




I am having trouble embedding a manifest file into an .exe created using Wise Script. When I use mt.exe (from Visual Studio 8 with SP1 installed) to embed the manifest file, the resulting file decreases in size from 123 KB to 23 KB and without any surprise doesn't run.

I used the following commandline:

mt.exe -manifest Test1.exe.manifest -outputresource:Test1.exe

I also tried adding the manifest using Resource Hacker, file size increases in size from 123 KB to 124 KB; however, when I execute
Test1.exe I get the following error: "Could not initialize installation. File size expected=168640121, size returned=126017"

How can I embed the manifest into an .exe created from Wise Script?


The information included in this knowledgebase article is for illustration only, and is provided as is without warranty or claim of usability by Symantec Corporation. If you use the information in this knowledgebase article, you do so at your own risk, and without expectation of support by Symantec.

Use resource hacker (http://www.angusj.com/resourcehacker/ ) in the following manner:

  1. Open the Wise file stub32.exe in Resource Hacker
  2. Select "Add a new resource" from the Action pull down menu
  3. With the Add a new resource dialog open, selected the manifest file (MyApp.exe.MANIFEST)
  4. Set Resource Type to: 24
  5. Set Resource Name to: 1
  6. Set Resource Language to: 1033
  7. Compile the script
  8. Saved the stub32.exe file

Now anything compiled with Wise Script Editor now has the MyApp.exe.MANIFEST embedded into the .exe.

Note: Changing stub32.exe is performed at the user's own risk and cannot be supported.