diff --git a/Contrib/MultiUser/MultiUser.nsh b/Contrib/MultiUser/MultiUser.nsh index c2792e69..833ac781 100644 --- a/Contrib/MultiUser/MultiUser.nsh +++ b/Contrib/MultiUser/MultiUser.nsh @@ -68,6 +68,9 @@ Var MultiUser.InstallMode !define MULTIUSER_EXECUTIONLEVEL_ALLUSERS !else RequestExecutionLevel user + !ifndef MULTIUSER_EXECUTIONLEVEL + !warning "MULTIUSER_EXECUTIONLEVEL not set!" + !endif !endif /* @@ -192,27 +195,35 @@ Installer/uninstaller initialization !macroend -!macro MULTIUSER_INIT_TEXTS +!macro MULTIUSER_INIT_TEXTS UNINSTALLER_PREFIX + + !if "${UNINSTALLER_PREFIX}" == "" + !define /ReDef MULTIUSER_TMPSTR_CAPTION "$(^SetupCaption)" + !else + !define /ReDef MULTIUSER_TMPSTR_CAPTION "$(^Name)" + !endif !ifndef MULTIUSER_INIT_TEXT_ADMINREQUIRED - !define MULTIUSER_INIT_TEXT_ADMINREQUIRED "$(^Caption) requires administrator privileges." + !define MULTIUSER_INIT_TEXT_ADMINREQUIRED "${MULTIUSER_TMPSTR_CAPTION} requires administrator privileges." !endif !ifndef MULTIUSER_INIT_TEXT_POWERREQUIRED - !define MULTIUSER_INIT_TEXT_POWERREQUIRED "$(^Caption) requires at least Power User privileges." + !define MULTIUSER_INIT_TEXT_POWERREQUIRED "${MULTIUSER_TMPSTR_CAPTION} requires at least Power User privileges." !endif !ifndef MULTIUSER_INIT_TEXT_ALLUSERSNOTPOSSIBLE !define MULTIUSER_INIT_TEXT_ALLUSERSNOTPOSSIBLE "Your user account does not have sufficient privileges to install $(^Name) for all users of this computer." !endif + !undef MULTIUSER_TMPSTR_CAPTION + !macroend !macro MULTIUSER_INIT_CHECKS UNINSTALLER_PREFIX UNINSTALLER_FUNCPREFIX ;Installer initialization - check privileges and set install mode - !insertmacro MULTIUSER_INIT_TEXTS + !insertmacro MULTIUSER_INIT_TEXTS "${UNINSTALLER_PREFIX}" UserInfo::GetAccountType Pop $MultiUser.Privileges @@ -312,13 +323,14 @@ Installer/uninstaller initialization ${endif} !endif - + + !if ${NSIS_PTR_SIZE} <= 4 ${else} ;Not running Windows NT, per-user installation not supported - Call ${UNINSTALLER_FUNCPREFIX}MultiUser.InstallMode.AllUsers - + + !endif ${endif} !macroend diff --git a/Docs/src/history.but b/Docs/src/history.but index a6d6b4b0..bb9b41d9 100644 --- a/Docs/src/history.but +++ b/Docs/src/history.but @@ -26,6 +26,8 @@ Released on ??? ??th, 20?? \b Fixed !macroundef of last defined macro bug +\b Fixed MultiUser caption string bug (\W{http://sf.net/p/nsis/bugs/1012}{bug #1012}) + \b !undef issues warnings instead of errors \b MakeNSIS prints -CMDHELP to stdout (\W{http://sf.net/p/nsis/bugs/1203}{bug #1203})