Stop! Tickets are now managed at GitHub.

Please enter new tickets, and find and edit existing tickets there:

Ticket #62 (assigned enhancement)

Opened 5 years ago

Last modified 21 months ago

It should be possible to run the Windows installer as non-admin

Reported by: refold Owned by: refold
Priority: minor Milestone: 2013.2.0.0
Component: Windows installer Keywords:
Cc: the.dead.shall.rise@…, jeffz


Current installer almost works when run under a limited user account, but the error message could be more clear. A more ambitious goal is to support a special "limited user" install mode.

Change History

Changed 5 years ago by refold

  • summary changed from It should be possible to run Windows installer as non-admin to It should be possible to run the Windows installer as non-admin

Changed 5 years ago by refold

  • component changed from (none-specified) to Windows installer

Changed 5 years ago by refold

  • owner changed from refol to refold
  • status changed from new to assigned

Changed 5 years ago by refold

  • type changed from defect to enhancement

Changed 4 years ago by refold

  • milestone changed from 2009.4.0 to 2010.2.0.0

Milestone 2009.4.0 deleted

Changed 4 years ago by refold

  • milestone changed from 2010.2.0.0 to 2010.4.0.0

Changed 4 years ago by VZ

Currently the installer refuses to even start up under Windows 7 without administrator credentials. This is annoying and makes the "Just unpack the files" installer option meaningless (as you need administrator rights to get to it in the first place).

It would be nice if either a simple .zip file could be provided (which, I think, would be enough especially if #129 is fixed) or the installer could only ask for administrator permissions when/if it really needs them.

Changed 3 years ago by jeffz

+1. This prevents me from installing the HP at university in the computer labs, which is a shame because I'd like to show other students how to program in Haskell with the HP.

Changed 3 years ago by jeffz

  • cc jeffz added

Changed 3 years ago by jeffz

I've noticed the following is set in

;Request application privileges for Windows Vista RequestExecutionLevel? admin

Can we have a build without this?

Changed 3 years ago by refold

I produced a new installer with RequestExecutionLevel? set to 'highest' instead of 'admin' (the download link will be posted here shortly). The 'just unpack' option should now work for non-admin users on Vista/7, though the standard install will fail with a non-intuitive error message.

It looks like the right way to do this is to start as a user and try to obtain admin privileges dynamically. On failure, only "just unpack" and "install for the current user" options would be available.

This may be relevant:

Unfortunately, I do not have time to pursue this further right now.

Changed 2 years ago by MtnViewMark

  • milestone 2010.4.0.0 deleted

Milestone 2010.4.0.0 deleted

Changed 2 years ago by nponeccop

Any progress on this? The HP 2012.2.0 installer just says "Error opening files for writing" when an installation is attempted on Vista from a non-administrative account with UAC prompts on, so I have to manually run the exe as an administrator.

Expected behaviour: display an UAC elevation prompt so I can enter admin login/pass. Actual behaviour: A failure with unclear error message and no prompt.

Changed 2 years ago by refold

@nponeccop Thanks for the reminder, I'll try to fix this for the next release.

Changed 22 months ago by refold

  • milestone set to 2012.4.0.0

Changed 21 months ago by refold

  • milestone changed from 2012.4.0.0 to 2013.2.0.0

This turned out to be harder than I expected. The recommended way is to just set RequestExecutionLevel to admin, but we can't do that since we also want to allow non-admin users to run the installer in portable mode. The UAC plugin is supposed to help with that, but I can't get the examples to compile ("Invalid command: UAC::_").

I tried doing the following:

!macro CheckAdmin thing
pop $0
${If} $0 != "admin" ;Require admin rights on NT4+
    MessageBox MB_YESNO "It is recommended to run this \
    ${thing} as administrator. Do you want to try to elevate privileges?" \
    IDNO CheckAdminDone

but the return code seems to have no effect. MultiUser.nsh seems to be old XP-era code that doesn't know about UAC prompts.

If anyone has ideas on how to proceed, I'm eager to listen. For now, I've just added a warning if the installer is run as non-admin.

Note: See TracTickets for help on using tickets.