Could someone please elaborate on how machine wide installs are supposed to work?
I have referred to machine-wide-installs.md but am not making much progress yet with creating a successful machine wide installer. I'm not sure if this is a bug or a mistake on my part. Thanks.
Actual: After running setup.msi, logging out and back in with the current user on Windows 8, the application is not installed to %localappdata%
Expected: From reading the documentation, I'm assuming that the app should be installed.
Repro steps:
- create nuget package (from nuget -pack command) -> output UserInterfaceApp.1.0.5855.30430.nupkg
- run releasify from CI powershell .\packages\squirrel.windows.1.2.1\tools\Squirrel.exe --shortcut-locations='Startup' --releasify $package.name (copied to S3 afterward)
- download files from S3 bucket to a local folder on the desktop (%userprofile%\desktop\test) and make sure to unblock the .exe and .msi from the properties dialog) RELEASES Setup.exe Setup.msi UserInterfaceApp-1.0.5855.30430-full.nupkg
- from a non-admin command prompt: cd %userprofile%\desktop\test Setup.msi
Notes: There are no errors in the eventvwr. There is no new entry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run after running setup.msi. This is a SquirrelAware app using SquirrelAwareApp.HandleEvents(); to avoid the default behavior of creating shortcuts.
Please take a look at https://github.com/Squirrel/Squirrel.Windows/issues/508 There is a patch and a fix on similar issues. Hope it helps.
@skaryshev Thanks but I believe that this is a different issue. The setup.msi runs but when the user logs out and logs in again the application is not installed. There are no errors in the event log and no registry entry either.
There is no new entry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
Check Wow6432Node. Also, do you have a SquirrelSetup.log?
There is a HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run entry with a value of %ProgramFiles%\ Installer\UserInterfaceApp.exe --checkInstall . I noticed that the installer is placed in ProgramFiles(x86) though.
I think that there might be two bugs with the registry value. 1) there's a space in the path and 2) the msi puts the installer under C:\Program Files (x86)\Installer since it's a 32 bit app.
If I manually created a copy of the installer under %ProgramFiles%\Installer it worked. Thanks.
Huh, interesting. Thanks for the tip, we'll look into it
@paulcbetts Thanks! Unfortunately, for our app since we use CefSharp we need to choose x86 or x64. We chose x86 to be conservative for it working on various PCs.
Please let us know if there's anything that we can do to help. Perhaps after we get more familiar with the code we could help with pull requests.
I'm not sure if what I mentioned above for issue 1 is really an issue. Maybe the code is already handling the space. For issue 2, I'm not sure if you would want a dependency on a tool like dumpbin for determining if an app is x86 or x64 (dumpbin /headers | findstr "machine") or if there's a way to read the "PE L" type entry from the binary?? Thanks. Cheers.
@provkristian So, whether or not your app is 64-bit, the installer itself is always 32-bit. You can install 64-bit apps with a 32-bit installer without a problem
@paulcbetts Thanks. I agree about the installer. The issue that we're seeing is that the registry entry that the Squirrel created MSI create points to %ProgramFiles%\ Installer\UserInterfaceApp.exe --checkInstall but the file is actually copied to %ProgramFiles(x86)%\Installer . We can use Powershell to workaround it if we need to but would rather not if possible.
@provkristian No that's definitely a bug, I'll see what I can do
@paulcbetts Okay, thank you. By the way, is there an organization behind Squirrel or is it supported by donations or anything?
@provkristian No donations, it's free :)
@paulcbetts Great. Thanks again. I work for a non-profit so free is helpful.
Good morning, I'm not sure how the triage process works for Squirrel. Is there an ETA for the fix? We're tentatively planning to use Powershell instead for fresh machine install. Thanks.
Good morning, FYI to others struggling with machine installs. It's essentially broken for our use case (machine install an app that is launched at startup) because of this issue and another (not sure if it's logged yet) where it doesn't launch the process with the proper working directory. It seems strange that Squirrel assumes that people want an app launched after install and does not give them an option to easily disable that.
Here's a simple workaround using powershell (pseudocode, I could try to share more if I have time):
- Unblock (assuming you're downloading from S3 or Azure Blob storage or something) and run setup.exe (using --silent)
- Copy Squirrel generated files to ProgramData folder (from the app data local folder)
- Delete Squirrel generated files in app data local and programdata
- Deleting Squirrel generated registry entry in HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Run (be careful here) or equivalent (if 32 bit machine)
- Unblock a shortcut to your app that points to the programdata subfolder and copy to Startup folder $env:ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\
- optionally invoke item for the shortcut
I'm sharing so it's hopefully useful to others and perhaps food for thought when fixing the Squirrel issues (maybe I could help if I have time). Note: this should allow auto-update to work fine if your config entries are properly setup. Thanks. -Kristian
I'm encountering the same bug. As mentioned above, the registry key entry points to %ProgramFiles% when it should point to %ProgramFiles(x86)%
As a temporary fix I just added a registry file to be run that changes the registry entry value to the correct location.
I am having this issue as well with the new version 1.2.4.0 is a fix coming for this? Or should we just find a work around?
This doesn't repro for me at all, MSIs work on 64-bit, can someone send me an MSI that doesn't work?
Uploading Setup.zip… The issue am having is the path in the registry key is incorrect it reads
%ProgramFiles%\ Installer\DU.exe --checkInstall (wrong directory and a space before installer)
If i change it to "C:\Program Files (x86)\Installer\DU.exe" it works great.
I am going to download MyApp and see if i can recreate the issue and send you the MSI
Can you also post your nuspec file? I think you're having problems because your nuspec file is incorrect. There's supposed to be a product name in that name, not Installer