3 Installer and uninstaller initialization
7 #--------------------------------
10 Function CommandLineParameter
40 Banner::show /NOUNLOAD "Checking system"
43 #Check all dependencies
58 Call un.CheckPrivileges
59 Call un.LoadUnInstaller
63 Function LoadInstaller
65 #Set the correct shell context depending on command line parameter
71 Call CommandLineParameter
72 Pop $CurrentUserInstall
74 ${if} $CurrentUserInstall == ${TRUE}
76 SetShellVarContext current
80 ${if} $AdminOrPowerUser == ${TRUE}
82 SetShellVarContext all
86 #Display an error when the /AllUsers command line parameter is used
87 #by a user without Administrator or Power User priviledges
90 Call CommandLineParameter
94 MessageBox MB_OK|MB_ICONSTOP "You need Administrator or Power User privileges to install ${APP_NAME} for all users."
98 SetShellVarContext current
99 StrCpy $CurrentUserInstall ${TRUE}
113 Function un.LoadUnInstaller
115 #Set the correct shell context depending on whether LyX has been installed
116 #for the current user or all users
118 ReadRegStr $R0 HKCU ${APP_REGKEY} ""
120 ${if} $R0 == $INSTDIR
121 StrCpy $CurrentUserInstall ${TRUE}
124 ${if} $CurrentUserInstall == ${TRUE}
126 SetShellVarContext current
130 ${if} $AdminOrPowerUser == ${FALSE}
131 MessageBox MB_OK|MB_ICONSTOP "${APP_NAME} has been installed for all users. Therefore you need Administrator or Power User privileges to uninstall."
134 SetShellVarContext all