fix per-user context in windows installer script (#402)

This commit is contained in:
Cyano Hao 2024-04-28 16:46:33 +08:00 committed by GitHub
parent 8b80e2a77d
commit fb13af8edf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 13 deletions

View File

@ -333,13 +333,6 @@ Function .onInit
IfFileExists "$APPDATA\Dev-Cpp\devcpp.cfg" 0 +2 # deprecated config file
SectionSetFlags ${SectionConfig} ${SF_SELECTED}
SetShellVarContext all
!if "${ARCH}" == "x86"
SetRegView 32
!else
SetRegView 64
!endif
FunctionEnd
Function .onSelChange
@ -350,8 +343,21 @@ FunctionEnd
Function myGuiInit
!insertmacro CheckOsArch
!insertmacro CheckOsBuild
; V2 always installs for all users
SetShellVarContext all
!insertmacro CheckV2Installer
; for unprivileged per-user (mode selection will be skipped)
; correct context will be set later if per-machine chosen
SetShellVarContext current
!if "${ARCH}" == "x86"
SetRegView 32
!else
SetRegView 64
!endif
!insertmacro SectionAction_CheckMingw64
!insertmacro SectionAction_CheckCompress
FunctionEnd
@ -360,7 +366,6 @@ Function un.onInit
!insertmacro MULTIUSER_UNINIT
!insertmacro MUI_UNGETLANGUAGE
SetShellVarContext all
!if "${ARCH}" == "x86"
SetRegView 32
!else

View File

@ -62,11 +62,6 @@ Var /GLOBAL sectionDepTemp
Call UninstallV2
SetRegView 64
Call UninstallV2
!if "${ARCH}" == "x86"
SetRegView 32
!else
SetRegView 64
!endif
!macroend
!macro CheckPreviousInstaller