Fixed MultiUser caption langstring bug (bug #1012)

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@7060 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2018-12-07 21:04:57 +00:00
parent 612c5c5638
commit 42e1df24a4
2 changed files with 21 additions and 7 deletions

View file

@ -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