What is the difference between the MyFile.dll and MyFile.CA.dll generated when building a Custom Action from the WiX template? #7762
-
I've had some issues pointed out to me that Windows Defender is flagging some binaries related to Custom Actions during our installation, authored using InstallShield, but some MSI dll Custom Actions are written using the WiX template (C#). I've decided to try to sign all of my Custom Action executables, but when I build the MSI dll CA, I get two .dlls in the output folder... MyFileCheck.dll When I compile the dll in Visual Studio, only the MyFile.dll gets signed. Since in InstallShield, the Custom Action is configured by pointing to MyFile.CA.dll, I tried to sign that binary as well, but that presents errors... EXEC : SignTool error : SignedCode::Sign returned error: 0x800700C1 Again, with using InstallShield, which dll is used from/included in the compiled installation pacakge? The command im using to sign is.... |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 30 replies
-
Hi, |
Beta Was this translation helpful? Give feedback.
-
For signing, $(TargetFileName) will get you the .dll. You'll want to hard the DLL.CA.DLL or use another MSBuild property. You probably also want to specify a timestamp server and the digest alogs for signing and timestamp signing. |
Beta Was this translation helpful? Give feedback.
-
Which version of WiX are you using? WiX 3.11.2 had a problem where the sfxca.dll template was signed. When your MyFile.dll was added to this template to make MyFile.CA.dll, the signature was invalidated. Microsoft's signtool won't sign a file that has an invalid signature. Signtool also won't remove an invalid signature. I only know this because I was bitten by this myself. |
Beta Was this translation helpful? Give feedback.
-
Thanks, I wasn't aware of that bug. I had moved onto the dev build 3.14 years ago due to other important fixes to me. I really wish a final 3.x would have shipped. It's nice to have an old stable with all known bug fixes and a v.next to choose from. |
Beta Was this translation helpful? Give feedback.
Which version of WiX are you using?
WiX 3.11.2 had a problem where the sfxca.dll template was signed. When your MyFile.dll was added to this template to make MyFile.CA.dll, the signature was invalidated. Microsoft's signtool won't sign a file that has an invalid signature. Signtool also won't remove an invalid signature. I only know this because I was bitten by this myself.
To work around this problem, use delcert to remove the signature from the template file.
The bug report for WiX - #6089
Delcert is available at - https://github.com/MadhukarMoogala/delcert