Skip to content

Commit

Permalink
installer: fix privileges (again)
Browse files Browse the repository at this point in the history
Turns out that we had *plenty* of problems with first switching
PrivilegesRequired to 'poweruser' and then to 'lowest': now upgrades
from 2.6.2 to 2.6.3 cannot write to C:\Program Files anymore.

Let's just revert the change and hope that this fixes the upgrade
problem.

In particular, this commit reverts 1f3e1f7 (installer: Change installer
privileges to 'lowest', 2015-10-20) and ec49475 (installer: clarify
required privileges, 2015-10-14).

The deeper explanation is that InnoSetup's `none` and `lowest` settings
are different in behavior, no matter what the release notes made us
believe. The `none` setting will actually respawn an elevated installer
if the current user is in the admin or power user group: see
https://github.com/jrsoftware/issrc/blob/841a86c32/Projects/Main.pas#L2939-L2940
and
https://github.com/jrsoftware/issrc/blob/ea65d280c/Projects/SpawnServer.pas#L217.

Therefore, the `none` setting is actually exactly what we want: users
who have credentials to write to C:\Program Files are presented with an
elevated installer that let's them do precisely that, users without
those rights will be presented with an installer that let's them install
Git into AppData in their home directory.

This fixes git-for-windows/git#523,
git-for-windows/git#526 and
git-for-windows/git#528.

Signed-off-by: Johannes Schindelin <[email protected]>
  • Loading branch information
dscho committed Nov 16, 2015
1 parent d9e07dc commit 23672af
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions installer/install.iss
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ DefaultGroupName={#APP_NAME}
DisableProgramGroupPage=auto
DisableReadyPage=yes
InfoBeforeFile={#SourcePath}\gpl-2.0.rtf
#ifdef OUTPUT_TO_TEMP
PrivilegesRequired=lowest
#else
PrivilegesRequired=none
#endif
UninstallDisplayIcon={app}\{#MINGW_BITNESS}\share\git\git-for-windows.ico
#ifndef COMPILE_FROM_IDE
#if Pos('-',APP_VERSION)>0
Expand Down

0 comments on commit 23672af

Please sign in to comment.