Changes between Version 2 and Version 3 of ClientSetupLogicWin


Ignore:
Timestamp:
May 24, 2007, 9:09:39 PM (17 years ago)
Author:
romw
Comment:

Check Point 2

Legend:

Unmodified
Added
Removed
Modified
  • ClientSetupLogicWin

    v2 v3  
    3737
    3838The following custom actions were designed specifically for BOINC:
     39
     40=== CARestoreSetupState ===
     41
     42Restore the previous setup parameters from the registry.
     43
     44Registry location: HKLM\Software\Space Sciences Laboratory, U.C. Berkeley\BOINC Setup
     45
     46|| Execution After:     || ISSetupFilesExtract ||
     47|| Execution Condition: || ||
     48
     49Pseudocode:
     50{{{
     51GetRegistryValue( "INSTALLDIR", strInstallDirectory );
     52GetRegistryValue( "SETUPTYPE", strSetupType );
     53GetRegistryValue( "LAUNCHPROGRAM", strLaunchProgram );
     54GetRegistryValue( "ENABLELAUNCHATLOGON", strEnableLaunchAtLogon );
     55GetRegistryValue( "ENABLESCREENSAVER", strEnableScreensaver );
     56GetRegistryValue( "SERVICE_DOMAIN", strServiceDomain );
     57GetRegistryValue( "SERVICE_USERNAME", strServiceUsername );
     58
     59SET INSTALLDIR TO strInstallDirectory
     60SET SETUPTYPE TO strSetupType
     61SET LAUNCHPROGRAM TO strLaunchProgram
     62SET ENABLELAUNCHATLOGON TO strEnableLaunchAtLogon
     63SET ENABLESCREENSAVER TO strEnableScreensaver
     64SET SERVICE_DOMAIN TO strServiceDomain
     65SET SERVICE_USERNAME TO strServiceUsername
     66
     67RETURN SUCCESS
     68}}}
     69
     70=== CASaveSetupState ===
     71
     72Save the current setup parameters to the registry.
     73
     74Registry location: HKLM\Software\Space Sciences Laboratory, U.C. Berkeley\BOINC Setup
     75
     76|| Execution After:     || ExecuteAction ||
     77|| Execution Condition: || ||
     78
     79Pseudocode:
     80{{{
     81GET INSTALLDIR STORE strInstallDirectory
     82GET SETUPTYPE STORE strSetupType
     83GET LAUNCHPROGRAM STORE strLaunchProgram
     84GET ENABLELAUNCHATLOGON STORE strEnableLaunchAtLogon
     85GET ENABLESCREENSAVER STORE strEnableScreensaver
     86GET SERVICE_DOMAIN STORE strServiceDomain
     87GET SERVICE_USERNAME STORE strServiceUsername
     88
     89SetRegistryValue( "INSTALLDIR", strInstallDirectory );
     90SetRegistryValue( "SETUPTYPE", strSetupType );
     91SetRegistryValue( "LAUNCHPROGRAM", strLaunchProgram );
     92SetRegistryValue( "ENABLELAUNCHATLOGON", strEnableLaunchAtLogon );
     93SetRegistryValue( "ENABLESCREENSAVER", strEnableScreensaver );
     94SetRegistryValue( "SERVICE_DOMAIN", strServiceDomain );
     95SetRegistryValue( "SERVICE_USERNAME", strServiceUsername );
     96SetRegistryValue( "SETUPSTATESTORED", strSetupStateStored );
     97
     98RETURN SUCCESS
     99}}}
    39100
    40101=== CAValidateSetupType ===
     
    61122RETURN SUCCESS
    62123}}}
     124
     125=== CAValidateServiceAccount ===
     126
     127Validates the service parameters passed to the execution phase.
     128
     129|| Execution After:     || CAValidateSetupType ||
     130|| Execution Condition: || VersionNT AND (SETUPTYPE = "Service OR SETUPTYPE = "ServiceGUI") ||
     131
     132Pseudocode:
     133{{{
     134IF ServicePassword IS NULL
     135    IF (ServiceDomainUsername IS NOT 'LOCALSYSTEM') AND (ServiceDomainUsername IS NOT 'NetworkService')
     136        RETURN ERROR
     137    END IF
     138END IF
     139
     140IF ServiceDomainUsername IS NULL
     141    IF (ServiceDomain IS NULL) OR (ServiceUsername IS NULL)
     142        RETURN ERROR
     143    END IF
     144ELSE
     145    SET ServiceDomain TO "Domain portion of ServiceDomainUsername"
     146    SET ServiceUsername TO "Username portion of ServiceDomainUsername"
     147END IF
     148
     149RETURN SUCCESS
     150}}}
     151
     152=== CAShutdownBOINC ===
     153
     154Gracefully shutdown BOINC if it is running, if that fails terminate it.
     155
     156|| Execution After:     || CAValidateServiceAccount ||
     157|| Execution Condition: || VersionNT AND NOT INSTALLED ||
     158
     159Pseudocode:
     160{{{
     161IF BOINCIsRunning() = TRUE
     162    ShutdownBOINC()
     163END IF
     164TerminateBOINC()
     165
     166RETURN SUCCESS
     167}}}
     168
     169=== CAShutdownBOINCManager ===
     170
     171Gracefully shutdown BOINC Manager if it is running, if that fails terminate it.
     172
     173|| Execution After:     || CAShutdownBOINC ||
     174|| Execution Condition: || VersionNT AND NOT INSTALLED ||
     175
     176Pseudocode:
     177{{{
     178IF BOINCManagerIsRunning() = TRUE
     179    ShutdownBOINCManager()
     180END IF
     181TerminateBOINCManager()
     182
     183RETURN SUCCESS
     184}}}
     185
     186=== CAShutdownBOINCManager95 ===
     187
     188Gracefully shutdown BOINC Manager if it is running, if that fails terminate it.
     189
     190|| Execution After:     || CAShutdownBOINCManager ||
     191|| Execution Condition: || Version95 AND NOT INSTALLED ||
     192
     193Pseudocode:
     194{{{
     195IF BOINCManagerIsRunning() = TRUE
     196    ShutdownBOINCManager()
     197END IF
     198TerminateBOINCManager()
     199
     200RETURN SUCCESS
     201}}}
     202
     203=== CAShutdownBOINCScreensaver ===
     204
     205Gracefully shutdown BOINC Screensaver if it is running, if that fails terminate it.
     206
     207|| Execution After:     || CAShutdownBOINCManager95 ||
     208|| Execution Condition: || VersionNT AND NOT INSTALLED ||
     209
     210Pseudocode:
     211{{{
     212IF BOINCScreensaverIsRunning() = TRUE
     213    ShutdownBOINCScreensaver()
     214END IF
     215TerminateBOINCScreensaver()
     216
     217RETURN SUCCESS
     218}}}
     219
     220=== CAMigratex86x64 ===
     221
     222Migrate BOINC Data from the 32-bit application storage location to the 64-bit application storage location.
     223
     224|| Execution After:     || CAShutdownBOINCScreensaver ||
     225|| Execution Condition: || ||
     226
     227Pseudocode:
     228{{{
     229MoveFileEx(
     230    "C:\Program Files (x86)\BOINC",
     231    InstallDir,
     232    MOVEFILE_COPY_ALLOWED|MOVEFILE_WRITE_THROUGH
     233)
     234
     235RETURN SUCCESS
     236}}}
     237
     238=== CAMigrateCPDNBBC ===
     239
     240Migrate the CPDNBBC data from the specialized CPDNBBC directory to the standard BOINC installation directory.
     241
     242|| Execution After:     || CAMigratex86x64 ||
     243|| Execution Condition: || ||
     244
     245Pseudocode:
     246{{{
     247MoveFileEx(
     248    "C:\Program Files\Climate Change Experiment",
     249    InstallDir,
     250    MOVEFILE_COPY_ALLOWED|MOVEFILE_WRITE_THROUGH
     251)
     252
     253RETURN SUCCESS
     254}}}
     255
     256=== CACleanupOldBinaries ===
     257
     258After uninstalling any older versions of BOINC, make sure all BOINC related binaries have been deleted from the system.
     259
     260|| Execution After:     || CAMigrateCPDNBBC ||
     261|| Execution Condition: || ||
     262
     263Pseudocode:
     264{{{
     265DeleteFile(InstallDir + "\boinc.exe");
     266DeleteFile(InstallDir + "\boincmgr.exe");
     267DeleteFile(InstallDir + "\boinccmd.exe");
     268DeleteFile(InstallDir + "\boinc.dll");
     269DeleteFile(InstallDir + "\libcurl.dll");
     270DeleteFile(InstallDir + "\libeay32.dll");
     271DeleteFile(InstallDir + "\ssleay32.dll");
     272DeleteFile(InstallDir + "\zlib1.dll");
     273DeleteFile(InstallDir + "\dbghelp.dll");
     274DeleteFile(InstallDir + "\dbghelp95.dll");
     275DeleteFile(InstallDir + "\srcsrv.dll");
     276DeleteFile(InstallDir + "\symsrv.dll");
     277
     278RETURN SUCCESS
     279}}}
     280
     281=== CAGrantServiceExecutionRight ===
     282
     283Make sure the service user account is allowed to execute services.
     284
     285|| Execution After:     || InstallInitialize ||
     286|| Execution Condition: || VersionNT And (SETUPTYPE = "Service" Or SETUPTYPE = "ServiceGUI") And SERVICE_GRANTEXECUTIONRIGHT = "1" ||
     287
     288Pseudocode:
     289{{{
     290pSID = GetAccountSid(ServiceDomainUsername)
     291SetPrivilegeOnAccount(
     292    pSID,
     293    "SeServiceLogonRight",
     294    TRUE
     295)
     296
     297RETURN SUCCESS
     298}}}
     299
     300=== CAGetAdministratorsGroupName ===
     301
     302Convert the well known group SID into the human readable localized version of the name.
     303
     304|| Execution After:     || CAGrantServiceExecutionRight ||
     305|| Execution Condition: || VersionNT ||
     306
     307Pseudocode:
     308{{{
     309GroupName = LookupAliasFromRid(NULL, DOMAIN_ALIAS_RID_ADMINS)
     310SET GROUPALIAS_ADMINISTRATORS TO GroupName
     311
     312
     313RETURN SUCCESS
     314}}}
     315
     316=== CAGetAdministratorsUsersName ===
     317
     318Convert the well known group SID into the human readable localized version of the name.
     319
     320|| Execution After:     || CAGrantServiceExecutionRight ||
     321|| Execution Condition: || VersionNT ||
     322
     323Pseudocode:
     324{{{
     325GroupName = LookupAliasFromRid(NULL, DOMAIN_ALIAS_RID_USERS)
     326SET GROUPALIAS_USERS TO GroupName
     327
     328
     329RETURN SUCCESS
     330}}}
     331