Search code examples
c#installationwixwindows-installer

MSI installs when used in command line but not when it's clicked


I have a MSI installer for my WPF application. Usually it's built and deployed via an AzureDevops pipeline but it fails since 8th of April. I think it's important to note: there were no code changes done that could impact the installer.

Once I click on the installer (and provide it with admin privileges once it asked) and try to get the application installed - it fails: enter image description here

That's what I've grabbed from the Windows events: enter image description here

There are some log I've grabbed from the app update which is also failed:

MSI (s) (44:74) [04:16:25:443]: Created Custom Action Server with PID 59164 (0xE71C).
MSI (s) (44:60) [04:16:25:949]: Running as a service.
MSI (s) (44:60) [04:16:25:952]: Hello, I'm your 32bit Impersonated custom action server.
Action start 4:16:25: LoadConfig.
SFXCA: Failed to create temp directory. Error code 5
CustomAction LoadConfig returned actual error code 1603 (note this may not be 100% accurate if translation happened inside sandbox)
Action ended 4:16:26: LoadConfig. Return value 3.
Action ended 4:16:26: INSTALL. Return value 3.

However if I run the installer via command line - it works! I used this command:

msiexec /i MyApplication.msi /l*v MyLogFile.txt

P.S. It happens with installers built by the AzureDevops pipeline. If I build it locally - it works as usual.

Does anyone have any ideas why this might happen and how to get it working again? Thanks in advance!


Solution

  • Do NOT downgrade your WiX version. You will be vulnerable to known security issues. Instead, upgrade you Custom Action project to use the v5 nupkg. It should be a drop-in replacement and has no known security vulnerabilities.