-
QuestionHi. I used to build and sign my setup using wix 3.11. Now i switched to the current wix/heatwave and have recreated the whole setup project. The setup consists of a bundle (build using the template with license) that contains 4 MSIs that are build in seperate projects. Everything works, up until i sign the bundle/bootstrapper. In unsigned form, the bootstrapper runs and installs the MSIs. Soon as it is signed, when run, it simply opens a "File-Open" dialog. All you can do is close this dialog and the installations terminates. i tried to extract the engine from the bundle to sign this too and reattach it, but when i try to sign the engine, i only get an (undocumented) error code from trusted signing. For all other files, trusted signing works as it is set up. (i do not know if this problem is in any way related to the first problem.) Any ideas what might be causing this? -thomas woelfer Open Source Maintenance Fee
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
|
So it turns out, both problems have to do with the order of signing. You absolutely have to do it in this order: 1.) Build Bootstrapper bundle If you just sign the bootstrapper and not the engine, none of the tools will complain, but the bootstrapper will be corrupted and running it will give you the "file open" dialog. If you sign the bootstrapper before detaching the "engine", none of the tools will complain, but you get a corrupted engine that neither signtool nor "dotnet sign" will be able to sign. (signtool will spit out an ERR_BAD_EXEIMAGE error, which was what helped me find the root cause for this.) It would be very nice if maybe "wix detach" would complain if it finds a bootstrapper that is already signed. (Took me all of 3 days to find out i was beeing dumb.) |
Beta Was this translation helpful? Give feedback.
-
|
I am actually using a .wixproj to build the setup. However, although i know it should be possible to make wix sign everythign during the build, i could not figure out what i actually had to do in that project, in order to get signed output. i had seen a remark regarding this in the documentation and trying it the way it was explained only gave me msbuild error message that i could not resolve. (i would very much like to to the signing during the build. i really would.) so after not beeing able to find out how to make this work in the project, i went for the command line way which (for me) was a lot easier to figure out how to use. This is why i am using wix.exe. if you have any pointers as how i could make this work directly in the build, i'd appreciate this very much. (i also opened a feature, although i am not sure i did it the right way.) |
Beta Was this translation helpful? Give feedback.
So it turns out, both problems have to do with the order of signing. You absolutely have to do it in this order:
1.) Build Bootstrapper bundle
2.) (Do not sign the bootstrapper at this stage)
3.) Remove "engine" with: wix burn detach PATH_TO_BUNDLE -engine PATH_TO_EXTRACT_ENGINE_TO
4.) Sign engine (doesn't matter if using signtool, dotnettool sign, local cert or trusted signing/artifact signing)
5.) Add engine back to bundle (creating a new file) with: wix burn reattach PATH_TO_BUNDLE -engine PATH_TO_SIGNED_ENGINE -o PATH_TO_SIGNED_BUNDLE
(where PATH_TO_SIGNED_ENGINE == PATH_TO_EXTRACT_ENGINE_TO).
If you just sign the bootstrapper and not the engine, none of the tools will complain, but t…