Tuesday, October 3, 2017

How to digital sign the one click installer build by wix

I sign the wix build one click installer. use signtool , got below exception:

i336: Acquiring container: WixAttachedContainer, copy from: C:\Users\test\Desktop\TestInstaller.exe 
i000: Setting string variable 'WixBundleLastUsedSource' to value 'C:\Users\test\Desktop\' 
e000: Error 0x80070001: Failed to extract all files from container, erf: 1:2:0 
e000: Error 0x80070001: Failed to wait for operation complete. 
e000: Error 0x80070001: Failed to open container. 
e000: Error 0x80070001: Failed to open container: WixAttachedContainer. 
e312: Failed to extract payloads from container: WixAttachedContainer to working path: C:\Users\test\AppData\Local\Temp\{8d17e055-d90d-4704-a556-bd5807e85920}\6C513FAEDC30F50DCA80F4305E027697FF9E50F8, error: 0x80070001. 
e000: Error 0x80070001: Failed while caching, aborting execution. 
i330: Removed bundle dependency provider: {8d17e055-d90d-4704-a556-bd5807e85920} 
i352: Removing cached bundle: {8d17e055-d90d-4704-a556-bd5807e85920}, from path: C:\ProgramData\Package Cache\{8d17e055-d90d-4704-a556-bd5807e85920}\ 
i399: Apply complete, result: 0x80070001, restart: None, ba requested restart:  No 


to fix it:


1. Build your bundle (using candle/light). 
    My light output was "TestInstaller.exe" 

2. detach the engine from TestInstaller.exe: 
    insignia -ib TestInstaller.exe -o engine.exe 

3. sign engine.exe with your certificate: 

4. re-attach the signed engine.exe to the bundle: 
    insignia -ab engine.exe TestInstaller.exe -o TestInstaller.exe 

5. sign TestInstaller.exe with your certificate. 

Thanks Jonks,
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Burn-3-8-1128-Error-0x80070001-Failed-to-extract-all-files-from-container-erf-1-2-0-td7593695.html