afrog icon indicating copy to clipboard operation
afrog copied to clipboard

Install to computer instead of user profile

Open rbcmhelpdesk opened this issue 11 years ago • 40 comments

We would like a package that installs to the computer instead of into the users profile. Security policies prevent execution of programs installed to the profile and this will make the software available to all users of the computer.

rbcmhelpdesk avatar Jan 26 '15 17:01 rbcmhelpdesk

The package install location is based on the UserProfile environment variable so just change that variable to a location that is acceptable for your security policy.

kevinsawicki avatar Jan 26 '15 17:01 kevinsawicki

Hi Kevin,

When we launch the installation package we are not given a choice of installation locations.

Group Policy for our organization blocks all executable files that are not installed in C:\Program Files

Doug

From: Kevin Sawicki [mailto:[email protected]] Sent: Monday, January 26, 2015 9:16 AM To: atom/atom Cc: rbcmhelpdesk Subject: Re: [atom] Install to computer instead of user profile (#5259)

The install location is based on the UserProfile environment variable so just change that variable to a location that is acceptable for your security policy.

— Reply to this email directly or view it on GitHub https://github.com/atom/atom/issues/5259#issuecomment-71497558 . https://github.com/notifications/beacon/AKNzuam4rs0GT7V8Elx5G0n-zTAzqaa_ks5nlm23gaJpZM4DXS0l.gif

rbcmhelpdesk avatar Jan 26 '15 17:01 rbcmhelpdesk

Hey Doug,

Sorry, Atom will only install to a user's profile directory, you should change your GP settings so that users can execute code from their own folders. In future versions, a Program Files-compatible version might exist but that's a long way off.

anaisbetts avatar Feb 02 '15 06:02 anaisbetts

How about just giving people an option where to install? It's pretty standard...

Zireael07 avatar Feb 23 '15 13:02 Zireael07

When we run the installation program there is no point where there is a choice on where to install it.

If you know of a switch or something similar we could use that would be very helpful

Thanks,

From: Zireael07 [mailto:[email protected]] Sent: Monday, February 23, 2015 5:35 AM To: atom/atom Cc: rbcmhelpdesk Subject: Re: [atom] Install to computer instead of user profile (#5259)

How about just giving people an option where to install? It's pretty standard...

— Reply to this email directly or view it on GitHub https://github.com/atom/atom/issues/5259#issuecomment-75541141 . https://github.com/notifications/beacon/AKNzuQ2HAuo7dfSKwxxxOb4E0aKFLGdYks5nuyQFgaJpZM4DXS0l.gif

rbcmhelpdesk avatar Feb 23 '15 16:02 rbcmhelpdesk

How about just giving people an option where to install? It's pretty standard...

Nope, we won't do that, sorry.

anaisbetts avatar Feb 23 '15 17:02 anaisbetts

In future versions, a Program Files-compatible version might exist but that's a long way off.

Why is that exactly? I was surprised to see it when the install location changed to the user directory. It's unusual and confusing to most Windows users.

What's the difficulty to just put it either into the Program Files, or any random location of the user's choice?

batjko avatar Feb 23 '15 23:02 batjko

I believe installing to Program Files requires administrator permissions, which is a no no.

  • No UAC dialogs, which means....
  • ...installs to the local user account (i.e. under %LocalAppData%)

winstliu avatar Feb 24 '15 01:02 winstliu

What's the difficulty to just put it either into the Program Files, or any random location of the user's choice?

If we put it in Program Files, we can no longer update silently, since changing those files requires us to pop a UAC dialog. This also prevents users who aren't Administrator from installing the app at all.

I do want to solve the case that @rbcmhelpdesk describes, where they want to provision an entire lab with Atom and manage it via GP, but I want that to be a special-case scenario, not the mainstream one.

anaisbetts avatar Feb 24 '15 01:02 anaisbetts

Disappointing. Yet another OSS that doesn't respect the Windows security model. I can't wait until somebody blames Microsoft because a vulnerability is exploited by allowing users to patch/overwrite application EXE since it's installed to the user's data folder instead of the application folder. UAC is there for a reason.

thx1200 avatar Mar 02 '15 21:03 thx1200

@thx1200 Repeat after me: UAC is not a security boundary. UAC was supposed to be the carrot for applications to design themselves exactly as we have, where apps don't need administrator permissions to install themselves.

anaisbetts avatar Mar 02 '15 21:03 anaisbetts

UAC is not a security boundary, but Program Files is, and Atom won't install to Program Files because, apparently, UAC. Probably laziness, but okay, UAC.

thx1200 avatar Mar 02 '15 21:03 thx1200

@thx1200 Google Chrome doesn't ask for UAC either. I personally find UAC annoying and it's nice when a program doesn't ask for it when installing (or the few that require it every single startup).

winstliu avatar Mar 02 '15 22:03 winstliu

I can tell this is a losing battle because nobody here apparently understands enterprise security in a Windows domain. That's fine, there are plenty of other text editors out there that don't install to %appdata%. And, you are right, Google Chrome does also install to %AppData% OR %ProgramFiles% if you want it to, which Atom does not. User choice. Imagine that! http://www.google.com/intl/en/chrome/business/browser/

thx1200 avatar Mar 02 '15 22:03 thx1200

@thx1200 There is a .zip Windows distribution which you can install to the location that makes sense for you. It is available as atom-windows.zip on https://github.com/atom/atom/releases/latest

kevinsawicki avatar Mar 02 '15 22:03 kevinsawicki

Yes, but remember that Squirrel is still in its infancy and that @paulcbetts has indicated that a Program Files-compatible version will be available eventually.

winstliu avatar Mar 02 '15 22:03 winstliu

Also, let's try and stay constructive and friendly. No need to wrap valid concerns into passive-aggressive woohaa.

On Mon, Mar 2, 2015 at 10:32 PM Wliu [email protected] wrote:

Yes, but remember that Squirrel is still in its infancy and that @paulcbetts https://github.com/paulcbetts has indicated that a Program Files-compatible version will be available eventually.

— Reply to this email directly or view it on GitHub https://github.com/atom/atom/issues/5259#issuecomment-76841293.

batjko avatar Mar 02 '15 22:03 batjko

So, @thx1200 is technically right in that installing to Program Files is a bit more secure than installing to the User's directory - though I'd argue that if someone is in a position to overwrite your user files with arbitrary data, you are already in a very bad position, one that isn't worth defending; they are already on the other side of the airtight hatch.

We've intentionally made this decision to be slightly less secure, in exchange for a number of benefits:

  • Users that don't have Admin privileges at all can install Atom (i.e. in a Corp domain)
  • We do not have to show UAC dialogs to update the app, so that we can do background updates
  • We do not have to show UAC dialogs to install the app either
  • We do not have to require the user to reboot in order to install an app update, because our files in Program Files are in-use by the currently running app.

anaisbetts avatar Mar 02 '15 23:03 anaisbetts

May I make a suggestion? With all the recent issues of cryptolocker, et al, I'm testing and hoping to deploy soon a GPO that will block many locations from allowing "arbitrary" .exe files to execute. This includes the %localappdata%*.exe and one path deeper, %localappdata%**.exe. So far the only real program blocked by that is Spotify, and users have been up in arms over it for years without a resolution. I have seen many prorgrams (Chrome included) that run two folders deep. Inside of AppData local it goes AppData\Local\CompanyName\ProductName\product.exe. This is allowed on our network. I have yet to see any viruses hide 2 folders deep. Could you just add an extra layer (say, GitHub\Atom) to the install path? I got the idea for the software restriction policies from many suggestions of the same paths all over the internet, so I know that many other organizations have similar SRPs. Just a thought. It might not help @rbcmhelpdesk that much, but it would at least help others with slightly less restrictive policies.

shawnr13 avatar May 14 '15 14:05 shawnr13

This is 100% fixed in the latest version of Squirrel, see these two PRs for more details:

  • https://github.com/Squirrel/Squirrel.Windows/pull/337
  • https://github.com/Squirrel/Squirrel.Windows/pull/308

This will be landing in a version of Atom very soon

anaisbetts avatar May 14 '15 21:05 anaisbetts