|
Custom Script: C0026
Overview:
Waited until the last minute? Not sure if your computers
are Year-2000 ready? This custom script will apply all the necessary updates for
Windows 95 & 98 (only if they're not already installed). If the client is
NT, this script will notify users if the needed SP5 and
IE5 updates are not installed. With NT, you can install the latest Service Pack
using the SL Manager Updates tab. For both 9x and NT, IE5 can be rolled out
using custom
script 0009, and don't forget to change the short year regional setting
using custom script 0010.
Add these lines to a post-engine Custom Script:
; ** ScriptLogic Y2K Update Script [BEGIN] **
; Last revised December 8, 1999 | (C)1999 Inteletek
; Designed for NT Workstaion 4.0, Windows 95 (all editions) & Windows 98 (first edition)
; Requires IE 5.010 or newer to also be installed (this is a separate custom script).
if ingroup('Update_Group')
$95UpdPath='x:\updates\microsoft\win95'
$98UpdPath='x:\updates\microsoft\win98'
$LANmboxtext='ScriptLogic has queued the automated installation of a critical Year-2000 update to your computer. After ScriptLogic completes, please answer YES when prompted to install the update and also when prompted to restart your computer.'
$RASmboxtext='ScriptLogic has detected your system requires critical Year-2000 updates to be installed, however, due to the size of this update, it will not be installed through your dial-up networking connection. '+$WarningContactText
; ** do not makes changes below this line **
$RunKey='$HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce'
$UpdNumber=''
$result=setconsole('show')
; Operating System Upgrades
select
case $OStype='NT' and $OSversion='4.0' and $NTtype<>'Server'
$IEver=readvalue('$HKLM\Software\Microsoft\Internet Explorer','Version')
if val(substr($IEver,1,1))<5 or val(substr($OsCsdVersion,len($OsCsdVersion),1))<5
$result=messagebox('ScriptLogic has detected that your computer does not have the required updates for Year-2000 compliance installed. $WarningContactText','Year 2000 Update Notification',4112,30)
endif
case $OStype='95' ; Windows 95 (all versions)
$UpdTotal='4'
select
; Win95 Update #1: MSDUN13.EXE (actually it's 1.2c)
case readvalue('$HKLM\system\CurrentControlSet\Services\RemoteAccess','Version')<>'1.2c' and existkey('$HKLM\Software\Classes\CLSID\{992CFFA0-F557-101A-88EC-00DD010CCC48}')=0
$RegCabLoc=readvalue('$HKLM\Software\Microsoft\Windows\CurrentVersion\Setup','SourcePath')
$TestFile='$RegCabLoc\Win95_02.cab'
$UpdFile='MSDUN13.EXE'
if exist('$TestFile') ; make sure Win95 setup cabs are available for this update
$UpdSwitches='/Q' ; quiet mode
$UpdCmdLine=$95UpdPath+'\'+$UpdFile+' '+$UpdSwitches
$UpdNumber='1'
else
$result=messagebox('ScriptLogic was unable to install Y2K update for Dial-up Networking ($UpdFile) because the installation Cab files were not found in the path specified by your registry ($RegCabLoc). $WarningContactText','Year 2000 Update Notification',4112,0)
endif
; Win95 Update #1: MSDUN13.EXE (part 2)
case readvalue('$HKLM\Software\Microsoft\Windows\CurrentVersion\RunOnce','RnaReboot')='rundll.exe rnasetup.dll,RnaReboot'
goto y2kscriptend
; Win95 Update #2: W95Y2K.EXE
case readvalue('$HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\Updates','Updates')<>'Year 2000 Update for Windows 95'
$UpdFile='W95Y2K.EXE'
$UpdSwitches='/Q /C:"y2ksetup /ii"' ; quiet mode / ignote IE ver. / no-reboot
$UpdCmdLine=$95UpdPath+'\'+$UpdFile+' '+$UpdSwitches
$UpdNumber='2'
; Win95 Update #3: Y2KVDHCP.EXE
case existkey('$HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\Updates\Y2K.W95.DUN') and existkey('$HKLM\Software\Classes\CLSID\{992CFFA0-F557-101A-88EC-00DD010CCC48}')=0
$UpdFile='Y2KVDHCP.EXE'
$UpdSwitches='/Q' ; quiet mode
$UpdCmdLine=$95UpdPath+'\'+$UpdFile+' '+$UpdSwitches
$UpdNumber='3'
; Win95 Update #4: MSJAVX86.EXE
case readvalue('$HKLM\Software\Microsoft\Active Setup\Installed Components\{08B0E5C0-4FCB-11CF-AAA5-00401C608500}','Version')<>'5,00,3188,0'
$UpdFile='MSJAVX86.EXE'
$UpdSwitches='/Q' ; quiet mode
$UpdCmdLine=$95UpdPath+'\'+$UpdFile+' '+$UpdSwitches
$UpdNumber='4'
endselect
case $OStype='98'
if $OSBuildNumber='4.10.2222'
; Win98 Second Edition - all set, no required updates.
else ; build 4.10.1998
; Win98 First Edition - requires updates
$UpdTotal='4'
select
; Win98 Update #1: Y2K.EXE
case readvalue('$HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\Updates','Updates')<>'Year 2000 Update for Windows 98'
$UpdFile='Y2K.EXE'
$UpdSwitches='/Q' ; quiet mode
$UpdCmdLine=$98UpdPath+'\'+$UpdFile+' '+$UpdSwitches
$UpdNumber='1'
; Win98 Update #2: Y2K_2.EXE
case existkey('$HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\Updates\Y2K.W98.2')
$UpdFile='Y2K_2.EXE'
$UpdSwitches='/Q' ; quiet mode
$UpdCmdLine=$98UpdPath+'\'+$UpdFile+' '+$UpdSwitches
$UpdNumber='2'
; Win98 Update #3: WUCSP.EXE (Service Pack 1)
case readvalue('$HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\Updates','Windows 98 Service Pack 1')<>'4,10,0,2000'
$UpdFile='WUCSP.EXE'
$UpdSwitches='/Q' ; quiet mode
$UpdCmdLine=$98UpdPath+'\'+$UpdFile+' '+$UpdSwitches
$UpdNumber='3'
; Win98 Update #4: MSJAVX86.EXE
case readvalue('$HKLM\Software\Microsoft\Active Setup\Installed Components\{08B0E5C0-4FCB-11CF-AAA5-00401C608500}','Version')<>'5,00,3188,0'
$UpdFile='MSJAVX86.EXE'
$UpdSwitches='/Q' ; quiet mode
$UpdCmdLine=$98UpdPath+'\'+$UpdFile+' '+$UpdSwitches
$UpdNumber='4'
endselect
endif ; 98 edition
endselect ; OS determination
if $UpdNumber<>''
if $ConnType='LAN'
$result=messagebox('$LANmboxtext','Year 2000 Update $UpdNumber/$UpdTotal: $UpdFile',4160,0)
$result=addkey('$RunKey')
$result=writevalue('$RunKey','SLY2KUPDATE','$UpdCmdLine','REG_SZ')
$UpdStatus='Queued: $UpdFile'
else ; RAS
$UpdStatus='Skipped: $UpdFile'
if readvalue('$SLkey','Y2K RAS Notified')<>'Yes'
; If connecting over RAS, no need to tell them every time..
$result=messagebox('$RASmboxtext','Year 2000 Update ($UpdFile)',4112,0)
$result=writevalue('$SLkey','Y2K RAS Notified','Yes','REG_SZ')
endif
endif
; * Update Y2KUPDLOG.CSV Log File with what we've done *
if $LogShare
$LogData='"$Date","$Time","$Wksta","$UserID","$VerboseOS","$ConnType","$UpdStatus"'+$CRLF
$LogFile=$LogShare+'\Y2KUPDLOG.CSV'
$result=Open(1, $LogFile, 5)
$result=WriteLine(1, $LogData)
$result=Close(1)
endif ; valid logshare
endif ; updated needed
endif ; member of required update group
:y2kscriptend
|