I am trying to solve an issue where I need to have a particular EXE install as a service if a box is checked and if not just install normally. To do this I have to have the same EXE referenced as two different components so one can be conditionally installed one way and the other the other. The issue this is causing is that when I then go to package and the exe is signed the resulting MSI has the compressed size of the exe twice because the exe is being copied and signed again by the packaging process. I have found that if I were to not have the exe be signed and run the exact same process the second copy that is created is compressed out just as expected. So something about the signing process is making the compression algorithm not work quite as expected.
I am thinking that if I pre-sign the exe before packaging and do not have Advanced Installer sign then I should be able to solve this issue because the two files that it is making will be perfectly identical (since the already signed exe will just be copied) but when I pre-sign and run the packager build and then extract out the MSI and check the EXE I am finding that my signature is no longer on the exe. In my setup the cab file is bundled in the MSI and the signing I am doing to test this is with a self signed certificate. Does anyone have any ideas why my signature is not making it through the packaging process? Is it because it is a self-signed certificate?