Internet Explorer Detection Script
Previous Top Next

'THINSTALL_RUNTIME_SCRIPT
'This script detects IE 5.0 or higher and prompts the user to download if they have a lower version

'Check the version of shdocvw.dll in c:\windows\system32
shdocvw_location = ExpandPath("%SystemSystem%") + "\shdocvw.dll"

'Get the field "FileVersion" from the DLL
file_version = GetFileVersionValue(shdocvw_location, "FileVersion")
need_download = 1

if file_version <> "" then
d=InStr(file_version, ".")
major_high = Mid(file_version, 1, d-1)
if major_high >= 5 then
need_download = 0
end if
else
'If the user does not have shdocvw installed at all, then we can't open IE and send them to the download page!
MsgBox("This program requires Internet Explorer 5.0 or higher be installed")
ExitProcess 0
end if

if need_download then
mres = MsgBox("This program requires Internet Explorer 5.0 or higher be installed" + Chr(13) + "Click OK to go to the download page for Internet Explorer" + Chr(13) + "Click Cancel to Abort", vbOKCancel, "Internet Explorer Upgrade Required")
if mres = vbOK then
set objShell = CreateObject("Shell.Application")
objShell.ShellExecute("http://www.google.com/search?hl=en&q=internet+explorer+download&btnI=I'm+Feeling+Lucky")
end if
ExitProcess 0
end if