IE4 SP1 Installation Sample Code
Keywords: IE4 SP1 internet explorer 4.01
;***********************************************************************************
; IE4Sp1.wbt *
; Version 1.03 *
; Date Created 06/23/1999 By min.zhang@cn.pwcglobal.com *
; *
; Date of Last Update *
; *
; 24/06 change start page (www.xxxx.com) *
; 25/06 check ie4 version *
; 26/06 add switch "M:0" to disable the Active bar and Web view *
; after restart the machine *
; 27/06 setup PwC proxy server *
; 28/06 check disk space *
; *
; Purpose: *
; This program is to deploy explorer software to the PwC staff upon network login *
; This will create a flag dir under windows and create a flag IE4.flg in to it *
; debug(@ON) *
;***********************************************************************************
Errormode(@OFF)
Pause("Internet Explorer 4.01 SP1","Welcome to the Internet Explorer 4.01 SP1 Active Setup,%@crlf%which will automatic installing Internet Explorer.%@crlf%%@crlf%Note: Internet Explorer 4.01 SP1 replace previous versions%@crlf%of Internet Explorer.")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Checking operating system... ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
regkey = RegOpenKey(@REGMACHINE, "Software\Microsoft\Windows\CurrentVersion")
winver = RegQueryValue(regkey, "[VersionNumber]")
RegCloseKey(regkey)
If winver != "4.00.1111" & winver != "4.03.1214" ;B version or image file sent from overseas
Message("Windows Version","The program can not be run in Windows version %winver%%@crlf%%@crlf%Please contact your local support staff")
Exit
EndIf
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;End check... ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Checking IE4 version... ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
regkey = RegOpenKey(@REGMACHINE, "Software\Microsoft\Windows\CurrentVersion")
iever = RegQueryValue(regkey, "[Plus! VersionNumber]")
RegCloseKey(regkey)
if iever >= "IE 4.0 4.72.3110.8"
Message("Active Setup Installation","Setup has detected that the newest versions of Internet Explorer%@crlf%components are already installed.%@crlf%%@crlf%Installer will exit without making any changes.")
Exit
Endif
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;End check... ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;set srting and check installation file ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;windir = Environment("windir")
;FlgDir = (StrCat("%WinDir%\Flag\"))
;IF !DirExist(FlgDir)Then DirMake(FlgDir)
;IF FileExist("%FlgDir%IE4Sp1.Flg")
; Pause("Internet Explorer 4.01 SP1","Internet Explorer 4.01 SP1 has already been installed on this machine!%@crlf%%@crlf%Press OK to reinstall, Cancel to exit")
; exit
;EndIf
TD = "0.2" ;set time delay vaule
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Close all applications before continue ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
list = WinItemize()
count = ItemCount(list,@tab)
Msg=0
for xx = 1 to count
thiswin = ItemExtract(xx,list,@tab)
if WinState(thiswin) == @Hidden then continue
If Msg != 1
Pause("Internet Explorer 4.01 SP1","Setup detect some applications are running, they will be closed before continue%@Crlf%%@Crlf%Press OK to close them, Cancel to exit")
TimeDelay(TD)
Msg = Msg + 1
Endif
WinClose(thiswin)
next
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;End check... ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
IE4Setup = "M:\Install\Software\Ie4sp1" ;path of installation driver
If !direxist (IE4Setup) ;check installation file
message("Internet Explorer 4.01 SP1","The installation file of Internet Explorer 4.01 SP1 can't be found in%@crlf%%IE4Setup% folder.%@crlf%%@crlf%Please contact your local support staff.")
exit
endif
If !FileExist(StrCat("%IE4Setup%\","Ie4setup.exe"))
Message("Internet Explorer 4.01 SP1","The Ie4setup.exe file can't be found in %IE4Setup% folder.%@crlf%%@crlf%Please contact your local support staff.")
exit
else
Setup_exe = FileTimeCode("%IE4Setup%\Ie4setup.exe")
If Setup_exe != 615716896
Message("Internet Explorer 4.01 SP1","The installation file in %IE4Setup% folder is illegal.%@crlf%%@crlf%Please contact your local support staff.")
exit
Endif
Endif
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;End check... ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Disk space check ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Display(5,"Internet Explorer 4.01 SP1", "Checking disk space, please wait...")
MB=1000*1000 ; Decimal school
;MB=1024*1000 ; Intermediate School
;MB=1024*1024 ; Binary School
Size = Diskfree("c")
HaveMB = Int(Size / MB)
If HaveMB < 60
Message("Internet Explorer 4.01 SP1", "There is no enough disk space to install Internet Explorer 4.01 SP1!%@crlf%%@crlf%Please contact your local support staff.")
Exit
Endif
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;End check... ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Run('%IE4Setup%\IE4SETUP.EXE', '/q /c:"ie4wzd /S:""#e"" /q /r:n /M:0"')
WinWaitExist("Internet Explorer 4.01 SP1 Active Setup", -1)
;WinWaitExist("Internet Explorer 4.0 Active Setup", 20)
;SendKeysTo ("Internet Explorer 4.01 Browser Only Install", "!N")
If WinExist("Internet Explorer 4.01 SP1 Active Setup") == @False Then GOTO END
AppWaitClose ("%IE4Setup%\IE4SETUP.EXE")
;FileCopy("%windir%\Start Menu\Programs\Internet Explorer\Internet Explorer.lnk", "%windir%\Start Menu\Programs\applications\Internet Explorer.lnk", @False)
;FileCopy("%windir%\Start Menu\Programs\Internet Explorer\Internet Explorer.lnk", "%windir%\desktop\applications\Internet Explorer.lnk", @False)
;FileDelete("%windir%\Start Menu\Programs\Internet Explorer\*.*")
;FileDelete("%windir%\Desktop\Outlook Express.lnk")
;DirRemove("%windir%\Start Menu\Programs\Internet Explorer")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Change regestry settings ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;The following prevents the IE 4.x splash screen from appearing at WIN95 boot time.
RegDelValue(@REGMACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Run[BrowserWebCheck]")
;The following prevents the IE 4.x Welcome Box from appearing at WIN95 boot time.
regkey = RegOpenKey(@REGUSERS, ".Default\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Tips")
RegSetDword(regkey, "[ShowIE4]", "0")
RegCloseKey(regkey)
;The following prevents the IE 4.x Active Bar from appearing at WIN95 boot time and setup start page.
regkey = RegOpenKey(@REGUSERS, ".Default\Software\Microsoft\Internet Explorer\Main")
RegSetValue(regkey, "[Show_ChannelBand]", "no")
RegSetValue(regkey, "[Start Page]", "http://www.xxxxx.com")
RegCloseKey(regkey)
;The following setup the PwC proxy server for the IE 4.x.
regkey = RegOpenKey(@REGUSERS, ".Default\Software\Microsoft\Windows\CurrentVersion\Internet Settings")
RegSetBin(regkey, "[ProxyEnable]", "01 00 00 00")
RegSetBin(regkey, "[EnableAutodial]", "00 00 00 00")
RegSetValue(regkey, "[ProxyServer]", "**put proxy server name here**")
RegCloseKey(regkey)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;End change regestry settings ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Flg=FileOpen("%FlgDir%\IE4Sp1.Flg","Write")
;FileWrite(Flg,"THIS IS A FLAG FILE DO NOT DELETE...%@Crlf%%@Crlf%GTS Staff will delete if required new system settings")
;FileClose(Flg)
PlayWaveForm ("M:\install\wbt\warning.wav", 1 | 9) ;I have to put the command at here, it's doesn't work in the next section!!
TimeOut = 5
while TimeOut > 0
Display (1, "Internet Explorer 4.01 SP1", "Machine will be restart to take effect in %TimeOut% seconds")
TimeOut = TimeOut-1
endwhile
PlayWaveForm ("M:\install\wbt\warning.wav", 0) ;close wave
IntControl (67, 0, 0, 0, 0) ;Restart machine
goto end
:END
EXIT
Article ID: W14238
Filename: IE4 Installation Sample Code.txt