Dim IE, fso, MyFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set IE = CreateObject("InternetExplorer.Application")
set wshshell = wscript.CreateObject("wscript.shell")
ie.left=0
ie.top=0
ie.height=700
ie.width=800
ie.menubar=0
ie.toolbar=0
ie.addressbar=0
ie.statusbar=0
ie.navigate "file:///c:\setup\html\loncust9.htm"
ie.visible=1
wscript.Sleep 5000
'set lonthree.vbs to run after reboot
if fso.FileExists ("c:\setup\lonthree.vbs") then
set strt = fso.getfolder("c:\documents and settings\all users\start menu\programs\startup")
fn = "runnext.vbs"
set nxt = fso.getfile("c:\setup\lonthree.vbs")
set fl = fso.createtextfile(strt & "\" & fn, true)
fl.writeline("set wshshell = wscript.createobject" & chr(40) & chr(34) & "wscript.shell" & chr(34) & chr(41))
fl.writeline("wshshell.run " & chr(34) & nxt & chr(34))
fl.Close
else
set MyFile = fso.GetFile("C:\Documents and Settings\All Users\Start Menu\Programs\Startup\runnext.vbs")
MyFile.Delete
end if
'For some reason, when running the IE6 setup inside of a vbscript, an error box is shown
'that says: "Unknown option "-" specified." Clicking OK on this message box causes the
'setup to continue as expected.
'The following AutoIT script waits for the appearance of a Windows Script Host dialog box and then closes it.
wshshell.Run "c:\setup\closewsh.exe", 6, false
'Install Internet Explorer 6
ie.Navigate "file:///c:\setup\html\loncust9.htm"
wshshell.Run "c:\tools\instie6.vbs", 1, true
'Machine may be rebooted by Internet Explorer 6 setup
'In case IE6 setup was skipped, force a reboot
wscript.Sleep 10000
WshShell.run "c:\tools\reboot.cmd", 6, true