forderud / BatterySimulator

Driver to simulate multi-battery setups and test Windows power management
MIT License
13 stars 1 forks source link

MSI install failure on computers without any "Trusted Publishers" certs #21

Closed forderud closed 3 months ago

forderud commented 3 months ago

MSI CustomAction AddCertToTrustedPublisher returned actual error code -2147024894 installer installation failure on clean VM. image

Reproduced error message:

> certutil.exe -addstore trustedpublisher simbatt.cer
trustedpublisher "Trusted Publishers"
Cannot open existing Cert store.  Use -f option to force Cert store creation.
CertUtil: -addstore command FAILED: 0x80070002 (WIN32: 2 ERROR_FILE_NOT_FOUND)
CertUtil: The system cannot find the file specified.

Install log extract

CustomAction AddCertToTrustedPublisher returned actual error code -2147024894 (note this may not be 100% accurate if translation happened inside sandbox)
Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.  Action AddCertToTrustedPublisher, location: C:\Program Files\BatterySimulator\, command: certutil.exe -addstore trustedpublisher "C:\Program Files\BatterySimulator\simbatt.cer" 
MSI (s) (38:B4) [07:14:07:105]: Product: BatterySimulator -- Error 1722. There is a problem with this Windows Installer package. A program run as part of the setup did not finish as expected. Contact your support personnel or package vendor.  Action AddCertToTrustedPublisher, location: C:\Program Files\BatterySimulator\, command: certutil.exe -addstore trustedpublisher "C:\Program Files\BatterySimulator\simbatt.cer" 

Work-around