swcarpentry / windows-installer

Software Carpentry installer for Windows.
MIT License
21 stars 17 forks source link

Installer requires admin rights #43

Open huguesfontenelle opened 8 years ago

huguesfontenelle commented 8 years ago

One student reported being unable to use the installer, because she did not have administrative rights on her machine.

Luckily she had Git for Windows pre-installed, so I suggested that she gets Anaconda, which can be installed without privileges. I suppose that Git for Windows Portable ("thumbdrive edition") could have been a workaround.

wking commented 8 years ago

On Tue, Mar 15, 2016 at 01:16:39PM -0700, Hugues Fontenelle wrote:

One student reported being unable to use the installer, because she did not have administrative rights on her machine.

Luckily she had Git for Windows pre-installed, so I suggested that she gets Anaconda, which can be installed without privileges.

The install script in this repository installs neither Git for Windows nor Python/Anaconda (see list of installed things here 1). It should install everything under the caller's home directory, so I'm not sure how we triggered a permissions violation. Can you provide more details on her setup, error messages, etc.?

huguesfontenelle commented 8 years ago

Right, my bad about what this installer is supposed to do. TBH I had not heard of it before getting this email:

Regarding the software we have to install in our PCs before starting the course, I’ll managed to install:

  • Bash shell (including Git)
  • Python

See screen shot below. But I could not install the text editor: Software Carpentry Windows installer I don’t have administrator rights in my PC. Is it necessary to have it installed for the course, right?

image001

I'm going to ask about the error message..

huguesfontenelle commented 8 years ago

I got a fast answer to my email, but this doesn't help much.

I’m afraid I cannot help you: The IT guy installed it, but when we try to open/run it, a small window appears for a fraction of a second a disappears, so I cannot read what it says or take a screen shot.

I can't help more, so feel free to close if you know that the Installer doesn't require admin rights!

ethanwhite commented 8 years ago

The installer does currently require administrative access. This occurs, at least in part, because it is installing code that does the installation into C:\Program Files (x86) which the user won't have write permissions to by default. In hindsight, there is no reason we need to install this there so we could put it in the users home directory. Anaconda does this and it lets them only require admin access if installing for all users, e.g.,:

anaconda_screencap

What I'm unsure of is whether or not this, on it's own, will prevent Windows from asking for administrative access to run the installer. I'm sure it's possible if we install where the user has write permission, just a question of whether there are extra switches that need to be flipped in the InnoSetup configuration file.

embray commented 8 years ago

For InnoSetup this would be

[Setup]
...
DefaultDirName={userpf}/Program Name
...

For the equivalent of "user program files". Not sure if this requires admin or not but I don't think it does...?

justbennet commented 8 years ago

I am trying to install a freshly downloaded Software Carpentry Windows Installer, and it triggers adminstrator authorization because it cannot verify the publisher. If I choose Run, it displays User Account Control. Using that, it offers to install in c:\program files\swc-installer. I install that, it says it finishes the installation, and then Setup throws an error from c:\p f\swc-installer\swc-windows-installer.exe

CreateProcess failed; code 216; This version of %1 is not compatible with the version of Windows you're running.

This is on Windows 7 Enterprise, Service Pack 1, 32-bit, installed into a Virtual Box VM.

justbennet commented 8 years ago

The magic from a Linux machine seems to think that is this type of file:

swc-windows-installer.exe: PE32+ executable for MS Windows (console) Mono/.Net assembly

embray commented 8 years ago

@justbennet I could be wrong, but I believe the installer is currently 64-bit only, which is why you would have gotten that error message.

carpenterbennet commented 8 years ago

@embray That's what I thought, and why I copied to Linux and asked the magic file. Maybe the magic file can't identify 64-bit Windows....

embray commented 8 years ago

PE32+ is the executable format for 64-bit executables on Windows.