Call MULTIUSER_INIT_QUIT if command line is incompatible (Bug #1253)
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7263 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
ee4c9b6e33
commit
11824508c7
2 changed files with 55 additions and 58 deletions
|
@ -9,7 +9,7 @@ Copyright 2008-2021 Joost Verburg
|
||||||
*/
|
*/
|
||||||
|
|
||||||
!ifndef MULTIUSER_INCLUDED
|
!ifndef MULTIUSER_INCLUDED
|
||||||
!define MULTIUSER_INCLUDED 20200319
|
!define MULTIUSER_INCLUDED 20210216
|
||||||
!verbose push 3
|
!verbose push 3
|
||||||
|
|
||||||
;Standard NSIS header files
|
;Standard NSIS header files
|
||||||
|
@ -36,13 +36,9 @@ Var MultiUser.InstallMode
|
||||||
|
|
||||||
!ifdef MULTIUSER_INSTALLMODE_COMMANDLINE
|
!ifdef MULTIUSER_INSTALLMODE_COMMANDLINE
|
||||||
!include StrFunc.nsh
|
!include StrFunc.nsh
|
||||||
!ifndef StrStr_INCLUDED
|
${Using:StrFunc} StrStr
|
||||||
${StrStr}
|
|
||||||
!endif
|
|
||||||
!ifndef MULTIUSER_NOUNINSTALL
|
!ifndef MULTIUSER_NOUNINSTALL
|
||||||
!ifndef UnStrStr_INCLUDED
|
${Using:StrFunc} UnStrStr
|
||||||
${UnStrStr}
|
|
||||||
!endif
|
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
Var MultiUser.Parameters
|
Var MultiUser.Parameters
|
||||||
|
@ -88,8 +84,8 @@ Install modes
|
||||||
;Install mode initialization - per-machine
|
;Install mode initialization - per-machine
|
||||||
|
|
||||||
${ifnot} ${IsNT}
|
${ifnot} ${IsNT}
|
||||||
${orif} $MultiUser.Privileges == "Admin"
|
${orif} $MultiUser.Privileges == "Admin"
|
||||||
${orif} $MultiUser.Privileges == "Power"
|
${orif} $MultiUser.Privileges == "Power"
|
||||||
|
|
||||||
StrCpy $MultiUser.InstallMode AllUsers
|
StrCpy $MultiUser.InstallMode AllUsers
|
||||||
|
|
||||||
|
@ -247,7 +243,7 @@ Installer/uninstaller initialization
|
||||||
!else if "${MULTIUSER_EXECUTIONLEVEL}" == Power
|
!else if "${MULTIUSER_EXECUTIONLEVEL}" == Power
|
||||||
|
|
||||||
${if} $MultiUser.Privileges != "Power"
|
${if} $MultiUser.Privileges != "Power"
|
||||||
${andif} $MultiUser.Privileges != "Admin"
|
${andif} $MultiUser.Privileges != "Admin"
|
||||||
${if} ${AtMostWinXP}
|
${if} ${AtMostWinXP}
|
||||||
MessageBox MB_OK|MB_ICONSTOP "${MULTIUSER_INIT_TEXT_POWERREQUIRED}"
|
MessageBox MB_OK|MB_ICONSTOP "${MULTIUSER_INIT_TEXT_POWERREQUIRED}"
|
||||||
${else}
|
${else}
|
||||||
|
@ -263,7 +259,7 @@ Installer/uninstaller initialization
|
||||||
;Default to per-machine installation if possible
|
;Default to per-machine installation if possible
|
||||||
|
|
||||||
${if} $MultiUser.Privileges == "Admin"
|
${if} $MultiUser.Privileges == "Admin"
|
||||||
${orif} $MultiUser.Privileges == "Power"
|
${orif} $MultiUser.Privileges == "Power"
|
||||||
!ifndef MULTIUSER_INSTALLMODE_DEFAULT_CURRENTUSER
|
!ifndef MULTIUSER_INSTALLMODE_DEFAULT_CURRENTUSER
|
||||||
Call ${UNINSTALLER_FUNCPREFIX}MultiUser.InstallMode.AllUsers
|
Call ${UNINSTALLER_FUNCPREFIX}MultiUser.InstallMode.AllUsers
|
||||||
!else
|
!else
|
||||||
|
@ -320,10 +316,11 @@ Installer/uninstaller initialization
|
||||||
|
|
||||||
${if} $MultiUser.Result != ""
|
${if} $MultiUser.Result != ""
|
||||||
${if} $MultiUser.Privileges == "Admin"
|
${if} $MultiUser.Privileges == "Admin"
|
||||||
${orif} $MultiUser.Privileges == "Power"
|
${orif} $MultiUser.Privileges == "Power"
|
||||||
Call ${UNINSTALLER_FUNCPREFIX}MultiUser.InstallMode.AllUsers
|
Call ${UNINSTALLER_FUNCPREFIX}MultiUser.InstallMode.AllUsers
|
||||||
${else}
|
${else}
|
||||||
MessageBox MB_OK|MB_ICONSTOP "${MULTIUSER_INIT_TEXT_ALLUSERSNOTPOSSIBLE}"
|
MessageBox MB_OK|MB_ICONSTOP "${MULTIUSER_INIT_TEXT_ALLUSERSNOTPOSSIBLE}"
|
||||||
|
!insertmacro MULTIUSER_INIT_QUIT "${UNINSTALLER_FUNCPREFIX}"
|
||||||
${endif}
|
${endif}
|
||||||
${endif}
|
${endif}
|
||||||
|
|
||||||
|
@ -445,7 +442,7 @@ Mode selection page
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
${if} $MultiUser.Privileges != "Power"
|
${if} $MultiUser.Privileges != "Power"
|
||||||
${andif} $MultiUser.Privileges != "Admin"
|
${andif} $MultiUser.Privileges != "Admin"
|
||||||
Abort
|
Abort
|
||||||
${endif}
|
${endif}
|
||||||
|
|
||||||
|
|
|
@ -109,7 +109,7 @@
|
||||||
<p>
|
<p>
|
||||||
Insert the MULTIUSER_INIT and MULTIUSER_UNINT macros in the .onInit and un.onInit
|
Insert the MULTIUSER_INIT and MULTIUSER_UNINT macros in the .onInit and un.onInit
|
||||||
function to verify these privileges. If no uninstaller is created in the script,
|
function to verify these privileges. If no uninstaller is created in the script,
|
||||||
set MULTIUSER_NOUNINSTALL.</p>
|
define MULTIUSER_NOUNINSTALL.</p>
|
||||||
<code>
|
<code>
|
||||||
<pre>!define MULTIUSER_EXECUTIONLEVEL Highest
|
<pre>!define MULTIUSER_EXECUTIONLEVEL Highest
|
||||||
;!define MULTIUSER_NOUNINSTALL ;Uncomment if no uninstaller is created
|
;!define MULTIUSER_NOUNINSTALL ;Uncomment if no uninstaller is created
|
||||||
|
@ -214,7 +214,7 @@ FunctionEnd</pre>
|
||||||
if Administrator or Power User rights are available (this is always the case if
|
if Administrator or Power User rights are available (this is always the case if
|
||||||
the execution level is set to Admin or Power, if Highest is set it depends on the
|
the execution level is set to Admin or Power, if Highest is set it depends on the
|
||||||
user account). For the Standard execution level the installation will always be
|
user account). For the Standard execution level the installation will always be
|
||||||
for a single user. On Windows 95/98/Me installation for a single user is not possible.</p>
|
for a single user. On Windows 95/98/Me installation for a single user is not possible, a per-machine installation will be performed.</p>
|
||||||
<p>
|
<p>
|
||||||
The following settings are available to change the default installation mode:
|
The following settings are available to change the default installation mode:
|
||||||
<table>
|
<table>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue