Skip to content

Installer doesn't offer an option to install for all users #314

Closed

Description

@physhster

In an enterprise environment, it is desirable to have apps installed in Program Files as part of a standard computer or app deployment process. Google uses %LocalAppData% for Chrome but offers an option for enterprise installation.
Could we get a silent install switch that installs silently in Program Files instead?

Thanks

Activity

  1. anaisbetts commented on Apr 27, 2015

    @anaisbetts
    Contributor

    Because of the way Squirrel works, Program Files is actually a much more difficult proposition than it seems - however, your suggestion on Twitter is super interesting, because it would allow IT admins to still deploy everywhere but we still get the great background update experience. You mentioned you had some better ideas than dirty hax, can you explain?

    (Edit: Said hax: https://gist.github.com/physhster/7f2ee1cbb36e03258401) - edit default user template, add Setup.exe to RunOnce

  2. physhster commented on Apr 27, 2015

    @physhster
    Author

    So, to take the Chrome example (https://www.google.com/work/chrome/browser/) since you guys seem to like a "no friction" installer, I would offer a separate MSI installer that installs in Program Files (with UAC warnings but that doesn't matter since we run in silent mode anyway). Chrome handles autoupdates just fine even when installed in Program Files.

  3. physhster commented on Apr 27, 2015

    @physhster
    Author

    Also, I would actually recommend against messing with the default registry hive with no warning. It's quite difficult to clean up afterwards. It just happens to work well for us here.

  4. anaisbetts commented on Apr 27, 2015

    @anaisbetts
    Contributor

    Chrome handles autoupdates just fine even when installed in Program Files.

    Do you know how it manages to do this?

  5. physhster commented on Apr 27, 2015

    @physhster
    Author

    They make a separate MSI installer that installs into Program Files. See https://www.google.com/work/chrome/browser/

  6. anaisbetts commented on Apr 27, 2015

    @anaisbetts
    Contributor

    @physhster Sure, that gets you in the door, that's easy. But how do they update that without popping UAC dialogs all the time

  7. willdean commented on Apr 27, 2015

    @willdean
    Contributor

    There are two Google Update services on my machine here which run as LocalSystem - I suspect they're what's doing it. Installing a service feels like pretty much the anti-Squirrel, though.

  8. physhster commented on Apr 27, 2015

    @physhster
    Author

    Either with clever permissions or with a service that runs as the local SYSTEM account. Honestly I have no idea but I can dig a bit... But some other shops do it so that means it can be done.

  9. physhster commented on Apr 27, 2015

    @physhster
    Author

    I guess @willdean found the answer then. I know it's not pretty to have an updater service running but if it's good enough for Google, I don't have a problem with it. Quite the contrary actually.

  10. anaisbetts commented on Apr 27, 2015

    @anaisbetts
    Contributor

    Hah! I've got a big problem with it :) It would complicate this whole thing by at least an order of magnitude and unless it was written very, very carefully, it would be a gaping security hole

  11. willdean commented on Apr 27, 2015

    @willdean
    Contributor

    For what my option is worth (nothing!), I think it would be very difficult to get right too - and things like updating the update service itself aren't trivial either.

    I can't currently remember what the problem would be with using an elevated initial MSI installer to alter the permissions on the "program files/my app" folder to allow non elevated overwrites later. Does that not work for some reason, or is it just considered to be horribly bad form?

  12. physhster commented on Apr 27, 2015

    @physhster
    Author

    In this case I'd rather have UAC notifications for updates and software that's installed in the right place.

  13. anaisbetts commented on Apr 27, 2015

    @anaisbetts
    Contributor

    Does that not work for some reason, or is it just considered to be horribly bad form?

    The bigger problem is what to set it to - when we install as a single user, we can set it to that user (or rather, we just inherit it), but in Program Files we have to allow anyone to update it, which is Bad. The best I can think of is "Authenticated Users" (i.e. anyone who has logged in), but that's like one step above "Everyone"

  14. physhster commented on Apr 27, 2015

    @physhster
    Author

    To follow up on my Twitter suggestion, this works well for any new user. Not the existing ones... And again, messing with default registry hives is quite a big security risk too. Can't imagine how pissed people would be when they find out.

  15. anaisbetts commented on Apr 27, 2015

    @anaisbetts
    Contributor

    @physhster Well that's the trick though, if we can edit the default hive, we can also roll down the list of actual users and mess with theirs too :)

  16. 21 remaining items

  17. anaisbetts commented on Oct 4, 2017

    @anaisbetts
    Contributor
  18. Neustradamus commented on Aug 14, 2019

    @Neustradamus

    Any news on it?

  19. Neustradamus commented on Jan 10, 2020

    @Neustradamus

    All good softwares when we install use by default "Program Files" (or recently "Program Files (x86)" for 32 bit apps in 64 bit system.
    Bad softwares do not use it.

    It is since Windows 95 and maybe before, no?

  20. tovodeverett commented on Aug 8, 2020

    @tovodeverett

    I think some more thought needs to be done on this strategy. I understand the desire for Squirrel to avoid per-machine file installs because that interferes with seamless updates by the users, and seamless updates by the users is what allows the developers using Squirrel to assume that the user base is generally on the latest version (or a very recent version), and thus avoid having to maintain support for older clients from the server side.

    However, the current per-machine approach has some serious drawbacks. I am not a corporate machine administrator, but I manage three home computers and they average 9 users for each computer:

    • Admin, since I refuse to run as root
    • One for each member of my family (that's 4)
    • A "guest" account
    • A "movie watching" account (300% zoom to make life easier when sitting on the couch)
    • An account for accessing work (keeps it isolated from my personal account)
    • An account for a FLL team I coach
    • Other accounts as necessary

    A per-user Discord install is 450+ MB. That means that if I allow the Discord installer to run as Admin, which triggers the per-machine strategy above, I have to pay a 4+ GB price per computer just to have Discord installed, because the minute someone logs in with an account, even if that account will never use Discord, it will silently drop stuff all over their AppData directory.

    I know I'm not going to convince Squirrel to avoid the per-user app directory, but at least let me only deal with the disk usage and increase in backup sizes for the accounts that actually use Discord (less than a third of the machine/account combinations I manage).

    Consider the following approach when the installer detects a per-machine situation:

    • Retain the "drop the installer into C:\ProgramData\SquirrelMachineInstalls" approach.
    • If that works, create a per-machine shortcut in the Start Menu (and you can stick one on the Desktop if necessary) that points to that installer.
    • Give the user running the initial installer a message that says, "We have done a polite per-machine install. Do you wish to install for this user and launch it now?" If the user says yes, then go ahead and install for that account and launch it. Otherwise, leave that user profile unsullied - after all, why would I ever want to run Discord from my Admin account?
    • When users run the per-machine shortcuts, that triggers the installer to check that the per-user install is present (if not, install for that user) and up-to-date (if not, update it) and then launches the app. If the installer can tell that this was a per-machine install (based on the location of the installer in the "C:\ProgramData\SquirrelMachineInstalls" directory), then it doesn't even need to drop shortcuts!

    I feel like this would be a fair compromise. As installation program developers, keep in mind that you have another constituency that isn't mentioned in https://github.com/Squirrel/Squirrel.Windows/blob/develop/docs/goals.md - you speak to developers and users, but fail to mention system administrators. Many computers don't have a system administrator (they may have a user that ends up doing that work, but most users do not separate in their mind the roles of being an administrator vs. being a user). Spend some time thinking about the needs and requirements of system administrators, and you will end up with a better installer. To this day, I refuse to install QuickTime or iTunes on any computer I manage, despite having an iPhone (my get-out-of-jail card is iMazing), because I spent a decade struggling with the installers when I did automated management of NT 4 and Win XP desktops. Please don't make me end up feeling the same way regarding products that use Squirrel for their installer!

    For now, I just spent spent 20 minutes ripping Discord completely off this computer (dir /s /a is my friend), hunting through the registry to find the Run key and other detritus, and then fell back to identifying which users will use it and then running the installer for each of them one at a time (I do not want to my users run installers) so as to avoid triggering an install for all of the other accounts as well.

  21. anaisbetts commented on Aug 9, 2020

    @anaisbetts
    Contributor

    @tovodeverett if you send me a self-addressed, stamped envelope, I will be glad to send you a $5 USB key to store all of the Discords you need.

  22. Neustradamus commented on Aug 9, 2020

    @Neustradamus

    @anaisbetts: Do you do it for all people who have this installer problem?

  23. anaisbetts commented on Aug 9, 2020

    @anaisbetts
    Contributor

    Yes

  24. tovodeverett commented on Aug 10, 2020

    @tovodeverett

    Unfortunately, redirecting %USERPROFILE% to a USB key seems like a sort of bad idea for a whole host of reasons (performance, reliability both electronic and physical, etc.). Ditto for redirecting %APPDATA% or %LOCALAPPDATA%. I'm pretty sure one could find a number of applications that assume that "%APPDATA%" == "%USERPROFILE%\AppData\Roaming". Sure, one might get away with it by using ntrights.exe -u Users +r SeCreateSymbolicLinkPrivilege to grant users the privilege of creating symbolic links and then using mklink to redirect the Discord folders to the USB drive, but the last time I tried using that approach to redirect %APPDATA%\.minecraft\saves to a folder on the user shares on my Samba server so that my kids would see the same set of Minecraft data no matter which machine they happened to use, Minecraft eventually modified their code and started crashing, so I've stopped trying tricks like that. The thought of relocating the entire C:\Users folder to a USB drive seems even worse - it's going to be difficult to administer the machine if the encryption key for the USB key gets sideways.

    Sure, 4 GB isn't going to kill me. But 10 applications that have space consumption like that will run my notebooks low enough on space that Windows 10 Feature Updates won't run. Not to mention that I end up closer to running out of adequate space on the set of USB spinning rust drives I use for backups, so now I've got to drop cash on new versions of those. I get that your reaction to my suggestion is to belittle it and to insist that space is cheap, but keep in mind that system administrators can react just as flippantly and put in place restrictions (app white listing, volume quotas, etc.) that would prevent users from installing or using those apps.

    I understand that the Squirrel installer ethos seems to be a reaction to the frustration felt by developers at the difficulty of easily deploying update to end users, but I think it short-sighted to ignore the externalities imposed on the people who have to manage, secure, backup, and support (not to mention justifying budgets to purchase) the computers those end users rely upon. Just as I should seek to understand the frustrations and difficulties that lead to the development of Squirrel, I encourage you to understand the legitimate concerns of another constituency. There are win-win solutions out there, the trick is finding them.

    Here's another thought - what if running the installer as an admin could create a world-writable shared folder for all of the downloaded files that was never-the-less secure for multiple untrusted users on a single system? Each user would have their own set of digitally signed file hashes that they download from the infrastructure servers and would open files with a persistent read-lock upon launch (thus blocking writes to the file), then verify the hash, and keep the persistent read-lock open as long as they were relying upon the file. All file downloads would be versioned, with new ones dropping in beside old ones. The last user to close a file would delete it if there was a newer version, thus keeping overall disk utilization to a minimum. I know that's a huge lift, and I've just suddenly tossed it over the fence with a, "Hey, could this work", but it's probably easier than convincing Microsoft to deploy deduplication support in Windows 10 2009.

  25. anaisbetts commented on Aug 10, 2020

    @anaisbetts
    Contributor

    So, the easiest workaround in your case is (note I'm describing Discord but this works for all Squirrel apps)

    1. Uninstall Discord on one of your user profiles

    2. Note that it leaves a folder behind in %LocalAppData%\Discord with a .dead file - this is Squirrel's signal to not install this on a profile, because the user chose to uninstall it

    3. Take that dead Discord folder and copy it to all the profiles you don't want Discord on - this folder isn't machine specific so you can drop it on other machines too

    Another approach is to not use the machine installer at all and just use the per-user installers, I'm not sure why in general if you only want Discord on a few users you'd use the MSI at all!

  26. tovodeverett commented on Aug 10, 2020

    @tovodeverett

    All I did was download DiscordSetup.exe (ver 0.0.51.0, 62,636,856 bytes), log into my Admin account, and run DiscordSetup.exe from a UAC-elevated Command Prompt. It automatically detected that it had full privs, created the C:\ProgramData\SquirrelMachineInstalls folder, created the entry in HKLM..Run, etc. There was no communication from the installer that indicated it was installing to the user profile vs. the machine (like a more traditional installer), but the complete lack of questions from the installer left me suspicious, so I located the app shortcuts and checked their targets. That's when I realized it had done a per-user install, and ran uninstall from the "Program and Feature" Control Panel (no need for Admin to have it). I then went to log in under my day-to-day account to research Discord installer behavior, and it silently installed and the shortcut showed up on my desktop. That was when I realized it was going to start silently installing on all the profiles. So I logged back in as Admin and started spelunking through the file system and registry so I could identify the hooks and remove them.

    Once I had some idea how the installer behaved and had completely removed it, I figured the easiest workaround was to simply avoid running the installer with Admin privs and only actively install it to the profiles that needed it. Then I found this thread and decided to chime in. I no longer do corporate desktop management (I did it for 16 years and that was enough, although it has left me with the odd behavior of maintaining manual build and configuration documentation for the machines I manage at home), so my current workaround is good enough for my home machines.

    I'm still in IT, though, and I had the realization yesterday that the reason dealing with Microsoft Teams is such a nightmare for my compatriots that do desktop management is that Teams uses Squirrel. I suspect they ended up using the MSI in conjunction with OPTIONS="noAutoStart=true" on the desktops. That said, I think they are still struggling heavily with figuring out how to (or if it is even possible to) support Teams in the Citrix environment - they have solutions for profile management, but 600 MB per-user would cause serious capacity issues.

    My larger point is that Squirrel has traded one set of issues for another, but that with some clever problem solving, you might be able to come up with a solution that retains the benefits for your current primary constituency (namely developers who want low-friction upgrades for their user base), but that reduce the impacts you have placed on a unrecognized constituency.

  27. anaisbetts commented on Aug 11, 2020

    @anaisbetts
    Contributor

    Running as elevated admin fails on normal Squirrel, Discord must have modified their fork and not contributed it upstream (they never do)

  28. Neustradamus commented on Aug 11, 2020

    @Neustradamus

    On several machines with more 100 users, I have seen several software installations:

    • 100x Brave installations
    • 100x GitHub Desktop installations
    • 100x GitHub Atom installations
    • 100x Myki installations
    • 100x by each Electron based software installations
    • ...

    I will not cited all softwares...

    And with deployment of roaming user profiles :

    • Data multiplication by users on machines
    • Data multiplication by users on servers
    • Data multiplication by users on local backups
    • Data multiplication by users on external backups
    • ...

    A USB key is very very small to solve this historical problem!

    I hope that you wil reopen this ticket and solve it.

    To all people: I had done a comment here about this problem:

  29. mimi89999 commented on Nov 10, 2020

    @mimi89999

    Your approach does not work well in domain environments with roaming profiles. It was already stated several times, but I will restate the issues since this issue is kept closed.

    • It makes things slow as adding hundreds of MB of program files for all users at the same time for all users is a recipe for a disaster
    • It takes space from user quotas (we increase those for all Squirrel apps) and takes NUMBER_OF_USERS * APP_SIZE space on the disks of the domain server for every app. If you have a hundred users that will be a huge waste of space
    • Breaks software restrictions policies that disable execution from user profile folders (a security requirement we have)
    • Many other issues that have been explained very well

    We are following all security advisories and are basically able to run the installer the same day on all machine. Works for most software. I don't see why you want to force those auto updates.

  30. anaisbetts commented on Nov 10, 2020

    @anaisbetts
    Contributor

    This is the way Squirrel works and once again, this is not a user support forum. Please take this up with your software vendor.

  31. locked and limited conversation to collaborators on Nov 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions