Roundup Tracker - Issues

Issue 2550719

classification
Install on Win 7, fails if not run as administrator
Type: behavior Severity: minor
Components: Installation Versions: 1.4
process
Status: fixed fixed
:
: rouilj : ber, cscortes, rouilj
Priority: :

Created on 2011-08-15 14:34 by cscortes, last changed 2016-07-14 22:04 by rouilj.

Messages
msg4375 Author: [hidden] (cscortes) Date: 2011-08-15 14:34
When you go through the install process, you need to run the
installer as administrator (at least on Windows 7).  Otherwise some
registry values do not get set ( it tells you it fails to do so with
error messages). 

Don't know why, but the installer should be able to
request administrator or notify the user it needs admin.

The work around is to right click the icon with the shift key pressed
and select "run as administrator".
msg4378 Author: [hidden] (ber) Date: 2011-08-15 15:09
Luis, 

I guess that quite a few people already believe that installation
should always happen as administrator. But you are right in that the
installer should give a reasonable message.
msg4380 Author: [hidden] (cscortes) Date: 2011-08-16 15:37
I think, if you are using ISS installer, that you need to tell it to run
as administrator for the PrivilegesRequired flag.  Seems like a trivial
change to me.  What do you think??

=================================================================

here is a copy of their documentation:

A typical Inno Setup installation running on Windows NT/2000/XP/2003
does not require administrative or "power user" privileges. However,
there are exceptions as noted below.

Things that require administrative privileges on both Windows
NT/2000/XP/2003:

    Using "PrivilegesRequired=admin" in the script's [Setup] section.
This causes Setup to abort with an error message if the user lacks
administrative privileges.
    Using the "restartreplace" flag in the [Files] section. This flag
causes Inno Setup to call the MoveFileEx function, which attempts to
write to "HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Control\
Session Manager". Write access to this key is restricted to Administrators.
    Writing to any key under HKEY_USERS\.DEFAULT using the [Registry]
section. Write access to this key is restricted to Administrators.

Things that require either administrative or "power user" privileges on
Windows 2000/XP/2003:

    Using "PrivilegesRequired=poweruser" in the script's [Setup]
section. This causes Setup to abort with an error message if the user
lacks either administrative or "power user" privileges.
    Using the "regserver" flag in the [Files] section. In most cases
registering a DLL involves writing to HKEY_CLASSES_ROOT, a privilege not
granted to ordinary users.
    Using the "sharedfile" flag is the [Files] section. This flag causes
Inno Setup to create/update a value in "HKEY_LOCAL_MACHINE\ SOFTWARE\
Microsoft\ Windows\ CurrentVersion\ SharedDLLs". Ordinary users are not
allowed to write to that key.
    Using the FontInstall parameter in the [Files] section.
    Writing to any key under HKEY_LOCAL_MACHINE or HKEY_CLASSES_ROOT
using the [Registry] section. Ordinary users are not allowed to write to
those keys.
msg4381 Author: [hidden] (ber) Date: 2011-08-16 18:50
> I think, if you are using ISS installer, that you need to tell it to run
> as administrator for the PrivilegesRequired flag.  Seems like a trivial
> change to me.  What do you think??

Sounds good, if you prepare a patch I'm willing to commit it.
I haven't done an Innosetup run for a long while.
Ideally we would also find someone to test the patch.

Thanks again for looking into this!
msg5816 Author: [hidden] (rouilj) Date: 2016-07-10 18:42
Looks like updating the RELEASE document to use:

./setup.py bdist_wininst --user-access-control force

will do this. I don't have a windows box handy to test but...
Requires python 2.6 or newer on the build machine.

Also I already updated the installation doc to say to run the
installer as administrator.
msg5850 Author: [hidden] (rouilj) Date: 2016-07-14 22:04
Got a windows box to test on. Adding:

 --user-access-control force

does create an executable that asks for admin privs when running.

Updated RELEASE.txt with the options.

See: de275ca660c5

Note this probably causes issues on XP, but at this point I don't care.
History
Date User Action Args
2016-07-14 22:04:01rouiljsetstatus: open -> fixed
assignee: rouilj
resolution: fixed
messages: + msg5850
type: behavior
2016-07-10 18:42:55rouiljsetstatus: new -> open
nosy: + rouilj
messages: + msg5816
2011-08-16 18:50:14bersetmessages: + msg4381
2011-08-16 15:37:11cscortessetmessages: + msg4380
2011-08-15 15:09:58bersetnosy: + ber
messages: + msg4378
severity: normal -> minor
type: compile error -> (no value)
2011-08-15 14:34:56cscortescreate