Squirrel.Windows
Squirrel.Windows copied to clipboard
Per-machine MSI creates registry entry for per-user installer with wrong path
Squirrel version(s)
1.9.1
Description
I'm on a 64 bit Windows 10 but installing a 32 bit application. Running the MSI (machine-wide) installer I end up with an installer located in %ProgramFiles(x86)%\NameOfApp Installer\App.exe
but the registry at HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Run
has the following entry: %ProgramFiles%\NameOfApp Installer\App.exe --checkInstall
- %ProgramFiles%
vs %ProgramFiles(x86)%
.
Steps to recreate
- Be on a Windows 10 64 bit
- Use squirrel in a 32 app
- Build the installer
- Run the MSI installer
- Verify that the registry points to a non-existent per-user installer executable
Expected behavior
The registry path should point to the actual location of the executable.
Actual behavior
The registry path points to a non-existing executable.
I'm not sure how many times I've mentioned this, but the current behavior is correct, because of WOW64 Registry Value Redirection. From https://docs.microsoft.com/en-us/windows/win32/winprog64/registry-redirector:
To help 32-bit applications that write REG_SZ or REG_EXPAND_SZ data containing %ProgramFiles% or %commonprogramfiles% to the registry, WOW64 intercepts these write operations and replaces them with "%ProgramFiles(x86)%" and "%commonprogramfiles(x86)%". For example, if the Program Files directory is on the C drive, then "%ProgramFiles(x86)%" expands to "C:\Program Files (x86)".
Hmm. The result for me is that the installer is not run when the user logs in. If I manually edit the registry, replacing %ProgramFiles%\NameOfApp Installer\App.exe --checkInstall
with %ProgramFiles(x86)%\NameOfApp Installer\App.exe --checkInstall
and logout/login then the installer is run and all is well.
With the current version (2.0.1), the registry value is :
"C:\Program Files (x86)\[NuGet Title] Deployment\[NuGet Id]DeploymentTool.exe" --checkInstall
I think the ticket can be closed.