Antivirus problems during installation of WixSharp built MSIs #1833
Replies: 7 comments 2 replies
-
|
Such a hook already exists. You can sign all files as long as you have an appropriate signing certificate. This is a quick illustration Compiler.SignAllFilesOptions.SkipSignedFiles = true;
...
project.DigitalSignature = new DigitalSignature
{
PfxFilePath = "wixsharp.pfx",
Password = "my_password",
Description = "MyProduct",
TimeUrl = new Uri("http://timestamp.verisign.com/scripts/timstamp.dll")
}
project.SignAllFiles = true;And this is a great discussion on signing with Azure Trusted Signing |
Beta Was this translation helpful? Give feedback.
-
|
I tried that one, but it seems to sign the files included in the installation package for the target PC, plus the MSI itself, but not the temporary files in use during the execution of the MSI. Like for instance WixSharp.UI.dll and DLLs containing custom actions. It is those temporary ones that the antivirus react on, and I would like to get them signed too. |
Beta Was this translation helpful? Give feedback.
-
|
You are right. Changing this ticket to the feature request... |
Beta Was this translation helpful? Give feedback.
-
|
Thank you! 🙏🏼 |
Beta Was this translation helpful? Give feedback.
-
|
Done. Will be available in teh very next release: While you do not need to do anything to activate the new feature, you can disable it if you prefer the pre-fix functionality. Compiler.SignAllFilesOptions.SignEmbeddedAssemblies = false; // the default is true I also added a convenient generic class to avoid bulky inheritance: project.DigitalSignature = new GenericSigner
{
Implementation = (file) =>
{
byte[] unsignedContent = IO.File.ReadAllBytes(file);
byte[] signedContent = SigningService.Sign(unsignedContent); // is a made up service
IO.File.WriteAllBytes(file, signedContent);
return 0;
}
}; |
Beta Was this translation helpful? Give feedback.
-
|
Lars, this is because another process is your setup builder that you are running (program.cs). Not an elegant solution, but it will work. |
Beta Was this translation helpful? Give feedback.
-
|
To minimize the impact of the the new feature I have updated the implementation of embedded assembly signing: 0361f3c:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi Oleg,
is seems the antiviruses continues to haunt Wix & WixSharp ... 🙄
This time the problem circles around the temp files that the MSI installer unpacks and executes under the temporary folder created in user %TEMP%. Like the WixSharp.UI.dll and others that are put there temporarily.
I'm wondering if it would be possible to put a code signing hook into WixSharp so these files also could be code signed during the MSI build process (hopefully pleasing the AVs)? Something like what you have already done with the IDigitalSignature interface, but for these "internal" files?
Best regards,
Lars
Beta Was this translation helpful? Give feedback.
All reactions