[wix-users] Major upgrade fails when installing certificates using IIsExtension

Oscar Acosta oscaracos at yahoo.com
Thu Jul 20 00:48:14 PDT 2017


Hello.
As part of my installation project, I'm installing some certificates using IIsExtension.
<Fragment> <Binary Id="CertsEX708Bin" SourceFile="$(sys.CURRENTDIR)\Certificados_Raiz201610.pfx" /> <ComponentGroup Id="CertificatesComponent" Directory="INSTALLFOLDER"> <Component Id="Certificates" Guid="{48ECA544-8C09-4E62-BCCE-70DBF50426C3}"> <CreateFolder/> <iis:Certificate Id="Certificados_Raiz201610" Name="Certificados Raices 201610" StoreLocation="localMachine" Overwrite="yes" StoreName="ca" Request="no" BinaryKey="CertsEX708Bin" PFXPassword="*******" /> </Component> </ComponentGroup></Fragment>
The first time everything goes fine, but in major upgrades, it fails with error:
"AddMachineCertificate:  Error 0x80070005: Failed to add certificate to the store."

It seems to be an old and known bug, as per:
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Certificate-install-to-local-machine-fails-with-code-26352-td1121050.htmlAnd:https://sourceforge.net/p/wix/bugs/1369/

I have tried setting Overwrite="yes" and Overwrite="no" with same results. Is there any way to avoid this error and use IIsExtension, or do I have to switch to c# custom action or similar to install and update certificates?


Kind regards.Oscar Acosta




More information about the wix-users mailing list