-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Installer doesn't offer an option to install for all users #314
Comments
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 |
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. |
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. |
Do you know how it manages to do this? |
They make a separate MSI installer that installs into Program Files. See https://www.google.com/work/chrome/browser/ |
@physhster Sure, that gets you in the door, that's easy. But how do they update that without popping UAC dialogs all the time |
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. |
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. |
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. |
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 |
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? |
In this case I'd rather have UAC notifications for updates and software that's installed in the right place. |
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" |
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. |
@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 :) |
In order for this to work, you need full admin privs, or run as the user... Chicken and egg problem that you face when running the installer remotely as the local or (god forbid) domain admin. |
God, this plan is getting more and more complicated by the minute - see why I didn't want per-machine installs! |
I get it :) I'm merely representing the enterprise market here. I feel like it's something you'll have to address at some point either way. |
Agree, just trying to find the best way to make everyone happy without turning Squirrel into a total mess from a developer usability perspective |
Could it work with a similar idea that Octopus deploy uses where you have a folder in the c drive outside of program files. eg C:\Squirrel\AppName\ This would work for some enterprises. I am sure most would prefer to have it in program files but this might be a decent middle ground. |
I edited the subject of the issue. To be fair, I don't think it matters where it's installed as long as all users can use the app. |
If you've got an update service running as system, the you can impersonate the logged on user and write directly to their registry without needing to separately load their hive on your own. That would at least get around the chicken and egg issues with logged on users. If you do that, plus modify the other users registry hives, plus modify the default user, you're all set! :) |
I agree with physhter here, I think it's an area that would need to be addressed before you see any enterprise adoption. Have you ever thought about a plugin/extensibility model? I know you're trying to keep Squirrel simple, so that may be too much. it would allow you to keep the core functionality clean but support use cases like this. Just thinking out loud, really. |
I'm certainly not disagreeing with the premise of making it easy for IT admins to be able to deploy Squirrel-based apps, only the proposed implementations :) That being said, ClickOnce doesn't support this at all and people still use it, so I'm not sure I agree with your assessment
This will almost certainly never happen - this is what was in the original Squirrel.Windows and it was a complete disaster - when you try to load these plugins into your process, you also drag along all their dependencies and they end up conflicting / shit gets Weird™. |
I agree, @paulcbetts , better to keep it simple and not pollute squirrel with MSI concerns. For someone looking to replace ClickOnce I wouldn't expect these types of features. |
Alright, I think I've come up with something far simpler than these other proposals The Plan:
Why?
|
You all may have already figured this out - but you should be giving write permissions to everyone to c:\programdata if you want anyone on the machine to use it. It is Microsoft best practice for software developers open up the permissions when the software creator wishes to - but the default is that "The first user to create / touch the folder get's special creator / owner modify permissions" Since enterprises frequently install with a totally different user ("SYSTEM" account under many software distribution systems) - the default permissions do not work when the actual end user did not run the installer in their machine context. If you don't do this, your folder will be subject to UAC Virtualization of any writes to that folder for any user that does not have permissions - and then things get VERY confusing (yeah, I know - like they aren't already). On the flip side of best practice - by placing software EXEs in ProgramData and opening permissions you open up the software EXEs to malware injection. Technically to be safe from that you should comply fully with the Microsoft model - and I believe your new --machine switch will allow you to in this way: C & D require that the software the installer contains also follows these rules and if necessary, probes these standard locations for it's configuration files. I know way more than I intended to on this topic because I needed to know it to create and teach this course: http://csi-windows.com/courses/foundations |
@DarwinJS I found your post informative, thanks for sharing! |
That's a security issue, we re-ACL the folder we write to, to be equivalent to Program Files, with read-Everyone. I don't know why I'd give write-Everyone permissions to that folder. I think you misunderstand how |
Commenting on closed topic. Just my $.02 on an entirely different scenario of deployment for all users. |
We're facing this issue, primarily for university lab situations. Since there are a lot of users per machine, we decided we couldn't go with the current --machine/MSI approach, which installs a new copy for each user (if I understand correctly). Happily, in this scenario, we really don't need the update capability. We don't even want it. I know... that's the whole point of squirrel, but we don't want to go back to hand-maintaining a wix file just for this one small set of users. So here's the rough plan we're going to attempt:
If anyone sees a problem with this plan, I'd appreciate hearing it. We are particularly ignorant about how this kind of bogus msi system will work in the computer lab scenario where admins do something once to install on all machines. At the moment it seems cheapest to just build this and then have the customers with this problem give it a try. @paulcbetts I'm assuming this is not a good fit for an upstream PR. |
@hatton is totally right I had to develop a hand made installer for ATOM in an high school, but did not have the courage to do so for github desktop or gitkraken wich are simply not used because of this approach |
@paulcbetts How can you write to HKLM without administrative privileges? In regards to point 4:
|
I found this thread with google. I'm looking for an MSI installer for schools. I need to install git desktop app using my teacher account, and when other users logon they don't have to re-install the app. please send me a trusted URL, on the git domain. I've seen several MSI installers, but they come from very odd URLS. If there is a way to hack the default installer please list those steps. Thanks, J current steps:
result: No ability to run git desktop app expected result: Some type of installer with option to install for all users |
@josephrowe Hi this is not a user support forum, if you're looking for the GitHub Desktop MSI installer, it's at https://central.github.com/deployments/desktop/desktop/latest/win32?format=msi |
Any news on it? |
All good softwares when we install use by default "Program Files" (or recently "Program Files (x86)" for 32 bit apps in 64 bit system. It is since Windows 95 and maybe before, no? |
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:
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:
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. |
@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. |
@anaisbetts: Do you do it for all people who have this installer problem? |
Yes |
Unfortunately, redirecting 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. |
So, the easiest workaround in your case is (note I'm describing Discord but this works for all Squirrel apps)
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! |
All I did was download 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 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. |
Running as elevated admin fails on normal Squirrel, Discord must have modified their fork and not contributed it upstream (they never do) |
On several machines with more 100 users, I have seen several software installations:
I will not cited all softwares... And with deployment of roaming user profiles :
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: |
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.
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. |
This is the way Squirrel works and once again, this is not a user support forum. Please take this up with your software vendor. |
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
The text was updated successfully, but these errors were encountered: