Changes between Version 7 and Version 8 of ClientSetupLogicWinSix


Ignore:
Timestamp:
Sep 25, 2007, 10:44:49 AM (17 years ago)
Author:
romw
Comment:

More Updates

Legend:

Unmodified
Added
Removed
Modified
  • ClientSetupLogicWinSix

    v7 v8  
    115115== Custom Actions ==
    116116
    117 
    118 
    119 
    120 
    121 
    122 == MSI Overview ==
    123 
    124 High level MSI overview:
    125 {{{
    126 GUI BEGIN
    127     Welcome Screen
    128     License Agreement
    129     Configuration Screen (BOINC Screensaver, Launch BOINC Manager at Logon, Advanced Button)
    130     IF AdvancedButtonClicked
    131         Advanced Configuration Screen (Change Install Directory, Change Data Directory, Select which components to install)
    132     END IF
    133     Confirmation Screen
    134 GUI END
    135 
    136 
    137 
    138 EXEC BEGIN
    139     ...
    140     ... MSI: Copies extracted MSI to storage location
    141     ... MSI: Search for existing BOINC installation
     117Several specialized pieces of code will manage the migration from the v5 data directory to v6 data directory structure. These custom pieces of code will all be executed during the execution phase of setup and will be introduced inbetween the following standard custom actions:
     118
     119{{{
    142120    ... MSI: Validates installaton package
    143121    ...
     
    158136    ...
    159137    ... MSI: Begin installation process
    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
     142Checks 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{{{
     145IF 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
     152ELSE
     153    IF SERVICE* IS NULL THEN
     154        ABORT
     155    END IF
     156END IF
     157}}}
     158
     159=== CAShutdownBOINC ===
     160
     161Kills boinc.exe is it is currently executing on the system.
     162
     163{{{
     164TerminateProcessByName("boinc.exe")
     165}}}
     166
     167=== CAShutdownBOINCManager ===
     168
     169Kills boincmgr.exe is it is currently executing on the system.
     170
     171{{{
     172TerminateProcessByName("boincmgr.exe")
     173}}}
     174
     175=== CAShutdownBOINCManager95 ===
     176
     177Kills boincmgr.exe is it is currently executing on the system using Win9x compatible means.
     178
     179{{{
     180TerminateProcessByName95("boincmgr.exe")
     181}}}
     182
     183=== CAShutdownBOINCScreensaver ===
     184
     185Kills boinc.scr is it is currently executing on the system.
     186
     187{{{
     188TerminateProcessByName95("boinc.scr")
     189}}}
     190
     191=== CACleanupOldBinaries ===
     192
     193Deletes 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{{{
     196DeleteFile(strInstallDirectory + _T("\\boinc.exe"));
     197DeleteFile(strInstallDirectory + _T("\\boincmgr.exe"));
     198DeleteFile(strInstallDirectory + _T("\\boinccmd.exe"));
     199DeleteFile(strInstallDirectory + _T("\\boinc.dll"));
     200DeleteFile(strInstallDirectory + _T("\\libcurl.dll"));
     201DeleteFile(strInstallDirectory + _T("\\libeay32.dll"));
     202DeleteFile(strInstallDirectory + _T("\\ssleay32.dll"));
     203DeleteFile(strInstallDirectory + _T("\\zlib1.dll"));
     204DeleteFile(strInstallDirectory + _T("\\dbghelp.dll"));
     205DeleteFile(strInstallDirectory + _T("\\dbghelp95.dll"));
     206DeleteFile(strInstallDirectory + _T("\\srcsrv.dll"));
     207DeleteFile(strInstallDirectory + _T("\\symsrv.dll"));
     208}}}
     209
     210=== CAMigratex86x64 ===
     211
     212Migrate 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{{{
     215MoveFileEx("C:\\Program Files (x86)\\BOINC", strInstallDirectory, MOVEFILE_COPY_ALLOWED|MOVEFILE_WRITE_THROUGH);
     216}}}
     217
     218=== CAMigrateCPDNBBC ===
     219
     220Migrate 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{{{
     223MoveFileEx("C:\\Program Files\\Climate Change Experiment", strInstallDirectory, MOVEFILE_COPY_ALLOWED|MOVEFILE_WRITE_THROUGH);
     224}}}
     225
     226=== CACreateBOINCAccounts ===
     227
     228Creates 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
     232strComputerName = GetComputerName()
     233
     234GetProperty("BOINC_USERNAME", strBOINCUsername)
     235IF strBOINCUsername IS NULL THEN
     236    strBOINCUsername = "boinc_" + strComputerName
     237END IF
     238
     239GetProperty("BOINC_PROJECT_USERNAME", strBOINCProjectUsername)
     240IF strBOINCProjectUsername IS NULL THEN
     241    strBOINCProjectUsername = "boinc_project_" + strComputerName
     242END IF
     243
     244strBOINCAccountPassword = GenerateNewPassword()
     245strBOINCProjectAccountPassword = GenerateNewPassword()
     246
     247IF GetUserAccount(strBOINCUsername) EXISTS THEN
     248    ResetUserAccountPassword(strBOINCUsername, strBOINCAccountPassword);
     249ELSE
     250    CreateUserAccount(strBOINCUsername, strBOINCAccountPassword)
     251    SetUserAccountProperty(strBOINCUsername, "PasswordNeverExpires")
     252END IF
     253   
     254IF GetUserAccount(strBOINCProjectUsername) EXISTS THEN
     255    ResetUserAccountPasswordstrBOINCProjectUsername, strBOINCProjectAccountPassword);
     256ELSE
     257    CreateUserAccount(strBOINCProjectUsername, strBOINCProjectAccountPassword)
     258    SetUserAccountProperty(strBOINCProjectUsername, "PasswordNeverExpires")
     259END IF
     260
     261WriteAccountsToDisk(strBOINCUsername, strBOINCAccountPassword, strBOINCProjectUsername, strBOINCProjectAccountPassword)
     262}}}
     263
     264=== CACreateBOINCGroups ===
     265
     266Creates the two security groups that BOINC will need to complete a secure installation.
     267
     268{{{
     269
     270}}}
     271
     272=== CAMigrateBOINCData ===
     273
     274Migrate 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{{{
     277MoveFileEx("C:\\Program Files\\BOINC", strDataDirectory, MOVEFILE_COPY_ALLOWED|MOVEFILE_WRITE_THROUGH);
     278}}}