3 Checks for Windows version
7 ;--------------------------------
10 !macro CheckPrivileges
14 UserInfo::GetAccountType
18 StrCpy $AdminOrPowerUser ${TRUE}
19 ${elseif} $R0 == "Power"
20 StrCpy $AdminOrPowerUser ${TRUE}
22 StrCpy $AdminOrPowerUser ${FALSE}
29 ;--------------------------------
32 Function CheckPrivileges
33 !insertmacro CheckPrivileges
36 Function un.CheckPrivileges
37 !insertmacro CheckPrivileges
42 ;Check for Windows NT 5.0 or later (2000, XP, 2003 etc.)
45 ${andunless} ${AtLeastWin2000}
47 MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} ${APP_VERSION} only supports Windows 2000, XP, 2003 and later."
53 Function UpdatePathEnvironment
58 ;Updates the path environment variable of the instaler process to the latest system value
60 ReadRegStr $R0 HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" Path
61 ReadRegStr $R1 HKCU "Environment" Path
63 System::Call 'kernel32::SetEnvironmentVariableA(t, t) i("Path", "$R0;$R1").r0'