| 160 | | ... MSI: Copy Files to installation directory |
| 161 | | ... MSI: Set Permissions installation directory |
| 162 | | ... MSI: Register Service |
| 163 | | ... MSI: Copy screensaver to screensaver installation directory |
| 164 | | ... MSI: Register Screensaver |
| 165 | | ... MSI: Start Services |
| 166 | | ... MSI: Register User |
| 167 | | ... MSI: Register Product |
| 168 | | ... MSI: Cleanup temporary files |
| 169 | | ... |
| 170 | | EXEC END |
| 171 | | }}} |
| | 138 | }}} |
| | 139 | |
| | 140 | === CAValidateSetup === |
| | 141 | |
| | 142 | Checks that the parameters passed into the installation program are valid for the installation type. Otherwise it reports an error to the user. This is a backup check for validating the parameters passed in via the command line, if the user is installing via the GUI this shouldn't ever be a problem. |
| | 143 | |
| | 144 | {{{ |
| | 145 | IF SetupType == 'Single-User' THEN |
| | 146 | IF ALLUSERS == 1 THEN |
| | 147 | ABORT |
| | 148 | END IF |
| | 149 | IF SERVICE* IS NOT NULL THEN |
| | 150 | ABORT |
| | 151 | END IF |
| | 152 | ELSE |
| | 153 | IF SERVICE* IS NULL THEN |
| | 154 | ABORT |
| | 155 | END IF |
| | 156 | END IF |
| | 157 | }}} |
| | 158 | |
| | 159 | === CAShutdownBOINC === |
| | 160 | |
| | 161 | Kills boinc.exe is it is currently executing on the system. |
| | 162 | |
| | 163 | {{{ |
| | 164 | TerminateProcessByName("boinc.exe") |
| | 165 | }}} |
| | 166 | |
| | 167 | === CAShutdownBOINCManager === |
| | 168 | |
| | 169 | Kills boincmgr.exe is it is currently executing on the system. |
| | 170 | |
| | 171 | {{{ |
| | 172 | TerminateProcessByName("boincmgr.exe") |
| | 173 | }}} |
| | 174 | |
| | 175 | === CAShutdownBOINCManager95 === |
| | 176 | |
| | 177 | Kills boincmgr.exe is it is currently executing on the system using Win9x compatible means. |
| | 178 | |
| | 179 | {{{ |
| | 180 | TerminateProcessByName95("boincmgr.exe") |
| | 181 | }}} |
| | 182 | |
| | 183 | === CAShutdownBOINCScreensaver === |
| | 184 | |
| | 185 | Kills boinc.scr is it is currently executing on the system. |
| | 186 | |
| | 187 | {{{ |
| | 188 | TerminateProcessByName95("boinc.scr") |
| | 189 | }}} |
| | 190 | |
| | 191 | === CACleanupOldBinaries === |
| | 192 | |
| | 193 | Deletes any lingering files left over from a previous BOINC installation, this can sometimes happen if a user replaces a stock client with a optimized one. |
| | 194 | |
| | 195 | {{{ |
| | 196 | DeleteFile(strInstallDirectory + _T("\\boinc.exe")); |
| | 197 | DeleteFile(strInstallDirectory + _T("\\boincmgr.exe")); |
| | 198 | DeleteFile(strInstallDirectory + _T("\\boinccmd.exe")); |
| | 199 | DeleteFile(strInstallDirectory + _T("\\boinc.dll")); |
| | 200 | DeleteFile(strInstallDirectory + _T("\\libcurl.dll")); |
| | 201 | DeleteFile(strInstallDirectory + _T("\\libeay32.dll")); |
| | 202 | DeleteFile(strInstallDirectory + _T("\\ssleay32.dll")); |
| | 203 | DeleteFile(strInstallDirectory + _T("\\zlib1.dll")); |
| | 204 | DeleteFile(strInstallDirectory + _T("\\dbghelp.dll")); |
| | 205 | DeleteFile(strInstallDirectory + _T("\\dbghelp95.dll")); |
| | 206 | DeleteFile(strInstallDirectory + _T("\\srcsrv.dll")); |
| | 207 | DeleteFile(strInstallDirectory + _T("\\symsrv.dll")); |
| | 208 | }}} |
| | 209 | |
| | 210 | === CAMigratex86x64 === |
| | 211 | |
| | 212 | Migrate any data files from "C:\Program Files (x86)\BOINC" to "C:\Program Files\BOINC" if "C:\Program Files\BOINC" doesn't already exist. |
| | 213 | |
| | 214 | {{{ |
| | 215 | MoveFileEx("C:\\Program Files (x86)\\BOINC", strInstallDirectory, MOVEFILE_COPY_ALLOWED|MOVEFILE_WRITE_THROUGH); |
| | 216 | }}} |
| | 217 | |
| | 218 | === CAMigrateCPDNBBC === |
| | 219 | |
| | 220 | Migrate any data files from "C:\Program Files\Climate Change Experiment" to "C:\Program Files\BOINC" if "C:\Program Files\BOINC" doesn't already exist. |
| | 221 | |
| | 222 | {{{ |
| | 223 | MoveFileEx("C:\\Program Files\\Climate Change Experiment", strInstallDirectory, MOVEFILE_COPY_ALLOWED|MOVEFILE_WRITE_THROUGH); |
| | 224 | }}} |
| | 225 | |
| | 226 | === CACreateBOINCAccounts === |
| | 227 | |
| | 228 | Creates the two user accounts that BOINC will need to complete a secure installation. Passwords are base64 encoded before being stored to disk. |
| | 229 | |
| | 230 | {{{ |
| | 231 | |
| | 232 | strComputerName = GetComputerName() |
| | 233 | |
| | 234 | GetProperty("BOINC_USERNAME", strBOINCUsername) |
| | 235 | IF strBOINCUsername IS NULL THEN |
| | 236 | strBOINCUsername = "boinc_" + strComputerName |
| | 237 | END IF |
| | 238 | |
| | 239 | GetProperty("BOINC_PROJECT_USERNAME", strBOINCProjectUsername) |
| | 240 | IF strBOINCProjectUsername IS NULL THEN |
| | 241 | strBOINCProjectUsername = "boinc_project_" + strComputerName |
| | 242 | END IF |
| | 243 | |
| | 244 | strBOINCAccountPassword = GenerateNewPassword() |
| | 245 | strBOINCProjectAccountPassword = GenerateNewPassword() |
| | 246 | |
| | 247 | IF GetUserAccount(strBOINCUsername) EXISTS THEN |
| | 248 | ResetUserAccountPassword(strBOINCUsername, strBOINCAccountPassword); |
| | 249 | ELSE |
| | 250 | CreateUserAccount(strBOINCUsername, strBOINCAccountPassword) |
| | 251 | SetUserAccountProperty(strBOINCUsername, "PasswordNeverExpires") |
| | 252 | END IF |
| | 253 | |
| | 254 | IF GetUserAccount(strBOINCProjectUsername) EXISTS THEN |
| | 255 | ResetUserAccountPasswordstrBOINCProjectUsername, strBOINCProjectAccountPassword); |
| | 256 | ELSE |
| | 257 | CreateUserAccount(strBOINCProjectUsername, strBOINCProjectAccountPassword) |
| | 258 | SetUserAccountProperty(strBOINCProjectUsername, "PasswordNeverExpires") |
| | 259 | END IF |
| | 260 | |
| | 261 | WriteAccountsToDisk(strBOINCUsername, strBOINCAccountPassword, strBOINCProjectUsername, strBOINCProjectAccountPassword) |
| | 262 | }}} |
| | 263 | |
| | 264 | === CACreateBOINCGroups === |
| | 265 | |
| | 266 | Creates the two security groups that BOINC will need to complete a secure installation. |
| | 267 | |
| | 268 | {{{ |
| | 269 | |
| | 270 | }}} |
| | 271 | |
| | 272 | === CAMigrateBOINCData === |
| | 273 | |
| | 274 | Migrate any data files from "C:\Program Files\BOINC" to all users application data location if the all users application data location doesn't already exist. |
| | 275 | |
| | 276 | {{{ |
| | 277 | MoveFileEx("C:\\Program Files\\BOINC", strDataDirectory, MOVEFILE_COPY_ALLOWED|MOVEFILE_WRITE_THROUGH); |
| | 278 | }}} |