Install Internet Explorer 8 With SCCM

The following script can be used with ConfigMgr / SCCM R2 to automatically deploy Internet Explorer 8.

You will need to ensure that systems do not have Internet Explorer running and the systems need to restart after the installation completes. It’s therefore strongly suggested that you advertise the package so it installs only when no users are logged on.

The script will:

  • Upgrade Internet Explorer from version 6 or 7 to Internet Explorer 8
  • Disables the ‘Run Once’ wizard
  • Sets the default search provider to Google Australia for all users
  • Turns an installation completion code to Configr / SCCM
  • Restarts the system when completed.

Save the following script into a vbs file, e.g. Install_IE8.vbs

'========================================================================================
' Internet Explorer 8 Installation/Upgrade Script
'========================================================================================
'
' Script Details:
' --------------
' This script does the following tasks:
' Upgrades Internet Explorer to version 8
' Disables the 'run once' wizard
' Sets the default search provider to Google Australia
' Returns installation error code to SCCM
'
' PLEASE NOTE: You require either Internet Explorer 6 or 7 and at least Windows XP SP3 installed.
'========================================================================================
Option Explicit

'Declare Variables and constants
Dim objSHell, objFSO, intErrorCode
Dim sAllUsersProfilePath, sLocaldirectory, strComputer, oEnv

'Create objects
set objShell = CreateObject("WScript.Shell")
sAllUsersProfilePath = objShell.Environment("PROCESS").Item("ALLUSERSPROFILE")
set objFSO = CreateObject("Scripting.FileSystemObject")

sLocalDirectory = objFSO.GetFile(WScript.ScriptFullName).ParentFolder

'========================================================================================
'Main body
'========================================================================================
On Error Resume Next

'Install IE8
intErrorCode = objShell.Run(sLocalDirectory & "\update\iesetup.exe /Passive /update-no /norestart",0,TRUE)

'Disable the "Run Once" Wizard for Current User
objShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\Main\DisableFirstRunCustomize", "1", "REG_DWORD"

'Disable the "Run Once" Wizard for All Users
objShell.RegWrite "HKLM\Software\Policies\Microsoft\Internet Explorer\Main\DisableFirstRunCustomize", "1", "REG_DWORD"

'Set default search provider to Google for current user
objShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\SearchScopes\DefaultScope", "{4D44CCC0-EF8E-4647-8FAA-960547A10E37}", "REG_SZ"

objShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\SearchScopes\{4D44CCC0-EF8E-4647-8FAA-960547A10E37}\DisplayName", "Google Search", "REG_SZ"
objShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\SearchScopes\{4D44CCC0-EF8E-4647-8FAA-960547A10E37}\Favicon_URL", "http://www.google.com/favicon.ico", "REG_SZ"
objShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\SearchScopes\{4D44CCC0-EF8E-4647-8FAA-960547A10E37}\URL", "http://www.google.com.au/search?hl=en&q={searchTerms}&meta=", "REG_SZ"
objShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\SearchScopes\{4D44CCC0-EF8E-4647-8FAA-960547A10E37}\SuggestionsURL", "http://clients5.google.com/complete/search?hl={language}&q={searchTerms}&client=ie8&inputencoding={inputEncoding}&outputencoding={outputEncoding}", "REG_SZ"

'Set default search provider to Google for all users
objShell.RegWrite "HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer\SearchScopes\DefaultScope", "{4D44CCC0-EF8E-4647-8FAA-960547A10E37}", "REG_SZ"

objShell.RegWrite "HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer\SearchScopes\{4D44CCC0-EF8E-4647-8FAA-960547A10E37}\DisplayName", "Google Search", "REG_SZ"
objShell.RegWrite "HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer\SearchScopes\{4D44CCC0-EF8E-4647-8FAA-960547A10E37}\Favicon_URL", "http://www.google.com/favicon.ico", "REG_SZ"
objShell.RegWrite "HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer\SearchScopes\{4D44CCC0-EF8E-4647-8FAA-960547A10E37}\URL", "http://www.google.com.au/search?hl=en&q={searchTerms}&meta=", "REG_SZ"
objShell.RegWrite "HKEY_USERS\.DEFAULT\Software\Microsoft\Internet Explorer\SearchScopes\{4D44CCC0-EF8E-4647-8FAA-960547A10E37}\SuggestionsURL", "http://clients5.google.com/complete/search?hl={language}&q={searchTerms}&client=ie8&inputencoding={inputEncoding}&outputencoding={outputEncoding}", "REG_SZ"

'Cleanup
Set objShell = Nothing
Set objFSO = Nothing

'return errorcode for install to SCCM
WScript.Quit(intErrorCode)

'Restart Computer
objShell.Run "shutdown.exe -r -t 5"

'========================================================================================

Was this article helpful?

Related Articles