Link to home
Start Free TrialLog in
Avatar of cheesebugah
cheesebugahFlag for United States of America

asked on

Install IE 10 silently

Hello,

I would like to silently install/upgrade Internet Explorer 10 on my clients within our Windows based network.  All of the client OS's are Win7.  However, some are 32 bit and some are 64 bit.  I would like to do this via a script file.  I have done a little research on this and there are 5 pre-requisite patches that need to be installed before the actual IE10 executable.  I have downloaded all of the necessary patches and IE10 executables needed for the install.  Can someone provide me with a vbscript file for this?  I am not a programmer but understand object oriented programming fairly well in VB.

Thanks,
Cheese
Avatar of cheesebugah
cheesebugah
Flag of United States of America image

ASKER

Hello,

This link is probably just what the doctor ordered.

http://www.itninja.com/question/ie-10-silent-install-with-updates

The part about extracting the files from the factory EXE's I understand.  The next bolded lines after that are a little vague to me.  What is dism.exe?

I would be very grateful if someone could walk me through this puppy.

Thanks
Avatar of RobSampson
Hi, here is an article on what DISM is:
http://technet.microsoft.com/en-au/library/hh825236.aspx

Using the /online switch means you are adding the package to the currently running online operating system.  I guess the IE package behaves a little differently when it is required to be installed in this manner.

Try out that script, it looks like it should do the job, and it logs to a file, so be sure to check out the log file for the status messages.

Regards,

Rob.
RobSampson,

How do you tie the file extraction and dism.exe commands in with the script?

Thanks,
Cheese
I want to deploy this package all wrapped us nice and tight.
You only need to extract the files once, and then whenever you run the script, it will use the extracted files.
If you wanted to add the extract command to the script as well, add
objShell.Run strScriptPath & "\IE10-Windows6.1-x86-en-us.exe /x:" & strScriptPath & "\IE10_x86", 1, True
objShell.Run strScriptPath & "\IE10-Windows6.1-x64-en-us.exe /x:" & strScriptPath & "\IE10_x64", 1, True

Open in new window


underneath this line:
Dim strScriptPath : strScriptPath = objFSO.GetParentFolderName(Wscript.ScriptFullName)

Open in new window


But you really shouldn't need to do that.

Regards,

Rob.
Rob,

I apologize for my programming shortcomings.  I'm still confused by the dism.exe command.  Where does that run?  Am I substituting script paths in the script to actual paths?  Does the dism command reference this script?  Please dumb this down for me?

Thanks,
Cheese
Hi, I've copied the code from there, and spent some time formatting it correctly, because ITNinja formatted it awfully for copying and pasting!

>> I'm still confused by the dism.exe command.  Where does that run?
DISM is run in the script on lines 54, 56, or 98 in the code I post below (I've added one line at the top to cite the source)

>> Am I substituting script paths in the script to actual paths?
No. As long as the script itself is in the same folder as the update files, and the IE10_x64 and / or IE10_x86 folders (that have the extracted files in them), the script will automatically find the files within those folders.

>> Does the dism command reference this script?
Not exactly.  The script runs the DISM command automatically for the final operation of installing IE10.

Basically, if you save this script in say C:\Temp you then need to put the following files with it:
C:\Temp\Windows6.1-KB2670838-x64.msu
C:\Temp\Windows6.1-KB2729094-v2-x64.msu
C:\Temp\Windows6.1-KB2731771-x64.msu
C:\Temp\Windows6.1-KB2533623-x64.msu
C:\Temp\Windows6.1-KB2786081-x64.msu
C:\Temp\IE10_x64\IE-Win7.CAB (extracted using IE10-Windows6.1-x64-en-us.exe /x:C:\temp\IE10_x64)
C:\Temp\Windows6.1-KB2670838-x86.msu
C:\Temp\Windows6.1-KB2729094-v2-x86.msu
C:\Temp\Windows6.1-KB2731771-x86.msu
C:\Temp\Windows6.1-KB2533623-x86.msu
C:\Temp\Windows6.1-KB2786081-x86.msu
C:\Temp\IE10_x86\IE-Win7.CAB (extracted using IE10-Windows6.1-x86-en-us.exe /x:C:\temp\IE10_x86)

Then the script should run.

If you have any more questions, let me know.

Regards,

Rob.

' Source: http://www.itninja.com/question/ie-10-silent-install-with-updates
Option Explicit
Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim objShell : Set objShell = CreateObject("WScript.Shell")
Dim objEnv : Set objEnv = objShell.Environment("Process")
'objEnv("SEE_MASK_NOZONECHECKS") = 1
Dim strScriptPath : strScriptPath = objFSO.GetParentFolderName(Wscript.ScriptFullName)
Dim LogFile : Set LogFile = objFSO.OpenTextFile("C:\Windows\Logs\Microsoft_Internet_Explorer_10_VBscript.log", 8, True)
Dim Return, KBname

'Determine OS Bit Level
Dim OSBitLevel
If GetObject("winmgmts:root\cimv2:Win32_Processor='cpu0'").AddressWidth = 32 Then
	OSBitLevel = 32
ElseIf GetObject("winmgmts:root\cimv2:Win32_Processor='cpu0'").AddressWidth = 64 Then
	OSBitLevel = 64
End If

LogFile.WriteLine vbCrLf & String(117, "-") & vbCrLf

'64-bit installs
If OSBitLevel = 64 Then
	'install 64-bit patch for KB2670838 (graphics and imaging issues fix)
	LogFile.WriteLine(Now & "  -  Installing update KB2670838_x64 for graphics and imaging issues fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2670838-x64.msu /quiet /norestart /log",0,True)
	Results("KB2670838_x64")
	
	'install 64-bit patch for KB2729094 (Segoe font fix)
	LogFile.WriteLine(Now & "  -  Installing update KB2729094_x64 for Segoe font fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2729094-v2-x64.msu /quiet /norestart /log",0,True)
	Results("KB2729094_x64")
	
	'install 64-bit patch for KB2731771 (local/UTC time conversion)
	LogFile.WriteLine(Now & "  -  Installing update KB2731771_x64 for local/UTC time conversion fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2731771-x64.msu /quiet /norestart /log",0,True)
	Results("KB2731771_x64")
	
	'install 64-bit patch for KB2533623 (Insecure library fix)
	LogFile.WriteLine(Now & "  -  Installing update KB2533623_x64 for Insecure library fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2533623-x64.msu /quiet /norestart /log",0,True)
	Results("KB2533623_x64")
	
	'install 64-bit patch for KB2786081 (IE credentials retention fix)
	LogFile.WriteLine(Now & "  -  Installing update KB2786081_x64 for IE credentials retention fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2786081-x64.msu /quiet /norestart /log",0,True)
	Results("KB2786081_x64")
	
	'install Internet Explorer 10 for 64-bit (includes 32-bit)
	LogFile.WriteLine(Now & "  -  Installing Internet Explorer 10 for 64-bit...")
	LogFile.WriteLine(Now & "  -       Install log:  C:\Windows\Logs\Microsoft_IE_10.log")
	'Factory installer:  Return = objShell.Run(strScriptPath & "\IE10-Windows6.1-x64-en-us.exe /quiet /update-no /closeprograms /norestart /log:C:\Windows\Logs\",0,True)
	If objFSO.FolderExists("C:\Windows\SysNative") Then
		'run non-redirect to 64-bit DISM
		Return = objShell.Run("C:\Windows\SysNative\dism.exe /online /add-package /packagepath:" & strScriptPath & "\IE10_x64\IE-Win7.CAB /quiet /norestart /logpath:C:\Windows\Logs\Microsoft_IE_10.log",0,True)
	Else
		Return = objShell.Run("dism.exe /online /add-package /packagepath:" & strScriptPath & "\IE10_x64\IE-Win7.CAB /quiet /norestart /logpath:C:\Windows\Logs\Microsoft_IE_10.log",0,True)
	End If
	If Return = 3010 Then
		LogFile.WriteLine(Now & "  -  WARNING: Installation of Internet Explorer 10 has completed successfully, however, required reboot was suppressed!")
		WScript.Quit(0)
	ElseIf Return <> 0 Then
		LogFile.WriteLine(Now & "  -  ERROR: Installation of Internet Explorer 10 has failed with error: " & RETURN)
	Else
		LogFile.WriteLine(Now & "  -  Installation of Internet Explorer 10 has completed successfully.")
	End If

'32-bit installs
ElseIf OSBitLevel = 32 Then
	'install 32-bit patch for KB2670838 (graphics and imaging issues fix)
	LogFile.WriteLine(Now & "  -  Installing update KB2670838_x86 for graphics and imaging issues fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2670838-x86.msu /quiet /norestart /log",0,True)
	Results("KB2670838_x86")
	
	'install 32-bit patch for KB2729094 (Segoe font fix)
	LogFile.WriteLine(Now & "  -  Installing update KB2729094_x86 for Segoe font fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2729094-v2-x86.msu /quiet /norestart /log",0,True)
	Results("KB2729094_x86")
	
	'install 32-bit patch for KB2731771 (local/UTC time conversion)
	LogFile.WriteLine(Now & "  -  Installing update KB2731771_x86 for local/UTC time conversion fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2731771-x86.msu /quiet /norestart /log",0,True)
	Results("KB2731771_x86")
	
	'install 32-bit patch for KB2533623 (Insecure library fix)
	LogFile.WriteLine(Now & "  -  Installing update KB2533623_x86 for Insecure library fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2533623-x86.msu /quiet /norestart /log",0,True)
	Results("KB2533623_x86")
	
	'install 32-bit patch for KB2786081 (IE credentials retention fix)
	LogFile.WriteLine(Now & "  -  Installing update KB2786081_x86 for IE credentials retention fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2786081-x86.msu /quiet /norestart /log",0,True)
	Results("KB2786081_x86")
	
	'install Internet Explorer 10 for 32-bit
	LogFile.WriteLine(Now & "  -  Installing Internet Explorer 10...")
	LogFile.WriteLine(Now & "  -       Install log:  C:\Windows\Logs\Microsoft_IE_10.log")
	'Factory installer:  Return = objShell.Run(strScriptPath & "\IE10-Windows6.1-x86-en-us.exe /quiet /update-no /closeprograms /norestart /log:C:\Windows\Logs\",0,True)
	Return = objShell.Run("dism.exe /online /add-package /packagepath:" & strScriptPath & "\IE10_x86\IE-Win7.CAB /quiet /norestart /logpath:C:\Windows\Logs\Microsoft_IE_10.log",0,True)
	If Return = 3010 Then
		LogFile.WriteLine(Now & "  -  WARNING: Installation of Internet Explorer 10 has completed successfully, however, required reboot was suppressed!")
		WScript.Quit(0)
	ElseIf Return <> 0 Then
		LogFile.WriteLine(Now & "  -  ERROR: Installation of Internet Explorer 10 has failed with error: " & RETURN)
	Else
		LogFile.WriteLine(Now & "  -  Installation of Internet Explorer 10 has completed successfully.")
	End If

End If

LogFile.Close

'Functions
'---------------------------------------------------------------------------------------------------------------------
Function Results(KBname)
	Select Case Return
		Case 9009
			LogFile.WriteLine(Now & "  -  WARNING: " & KBname & " is already installed; skipping installation.")
		Case 2359302
			LogFile.WriteLine(Now & "  -  WARNING: " & KBname & " is already installed; skipping installation.")
		Case -2145124329
			LogFile.WriteLine(Now & "  -  WARNING: " & KBname & " is not required for this system; skipping installation.")
		Case Else
			LogFile.WriteLine(Now & "  -  Install of " & KBname & " has completed with return code: " & RETURN)
	End Select
End Function

Open in new window

Rob,

You have saved the day for me sir.  I am extremely grateful to you.  When I copy the script you so kindly revised, what file extension would I save it as and are there any switches I should associate with the package?  I am deploying via the Kaspersky Security Center.

Thanks,
Cheese
I just thought of something else.  Do I need to copy the files associated with this script to the client computer and then run locally?  I don't think so, but just making sure.

Thanks again,
Mike (Cheese)
I think you meant to use x64 in the extraction command for 64 bit instead of x86.  No biggie though, I get it.  Thanks again!
>> what file extension would I save it as and are there any switches I should associate with the package

Save the file with a .VBS extension.  It is VBScript.  You won't need any switches as the script doesn't accept any, but you could have Kaspersky run
wscript.exe //B <scriptpath>
which executes the script in complete silent mode so no prompt would appear.

>> Do I need to copy the files associated with this script to the client computer and then run locally?
You shouldn't do, especially if you called the script from a UNC path, or Kaspersky automatically added a mapped drive when running it, since the script references its current folder to find the required files.

>> I think you meant to use x64 in the extraction command for 64 bit instead of x86
Correct.  I have amended that ;-)

Hopefully it will work for you from Kaspersky.  Don't forget to check out the log file at C:\Windows\Logs\Microsoft_Internet_Explorer_10_VBscript.log on the target computer when you try it.

Regards,

Rob.
Rob,

On line 19, what is the 117 variable?
Rob,

I also noticed that lines 6, 51 and 97 are commented out?  Is that a mistake?
Line 53 is commented out also?
Hi, the String(117, "-") writes a line with 117 dashes in the log file. It's a short way of repeating a character in a string. I accidentally left line 6 commented out. If you are running from a network share, which Kaspersky probably will do, uncomment that zone check line.  Lines 51 and 97 look like what you would use if you were installing the non extracted file, that would not work for this.

Regards,

Rob.
Line 53 looks like a comment to me.  Am I correct on that one sir?
Thank you Rob Sampson!
Rob,

Sorry but I seem to have jumped the gun on this one.  I apologize.  I packaged the whole enchilada and ran it via Kaspersky and I am getting no log file and the error message in Kaspersky is so vague it is not funny.  Would you please take a peek at the script file and see if there is anything that looks out of place?

Thanks,
Mike
Rob,

I ran the package locally on my machine and received this error.

Thanks,
Mike
Forgot to upload the file.  Sorry.U--IE-10-Install-Upgrade-IE10-Install-Er
Mike, sorry for my late reply.  The Permission denied error means the script cannot create the log file it is trying to write to at "C:\Windows\Logs\Microsoft_Internet_Explorer_10_VBscript.log"
Make sure the script is running with admin rights, and elevated privileges.

Regards,

Rob.
Okay, I think it would be running with admin rights from Kaspersky, but don't know the nature of why it failed there.  I'll try it again locally (with admin rights) and see what happens.

Thanks,
Mike
Okay, even as a domain admin I cannot save a file in the C:\Windows\Logs location.  I will have to find another location to create the file locally I suppose and adjust the script.
Okay, I changed the logfile location to my home folder.  The script ran until hitting a snag at the "install 64-bitpatch for KB2729094 (Segoe font fix)" section.  Then, the Windows Update Standalone Installer GUI popped up showing me a list of switches and their definitions.  When I hit the OK button, it just brings it up again?  I've attached the log file if that helps at all.  It's like one of the switches is incorrect or something?  I have modified the script a little, so I've attached that also for your perusal.  Almost there.  I can taste it.  Once again, thank you very much for your assistance.
C--Users-mmcclellan-Desktop-IE-10-Upgrad
U--Microsoft-Internet-Explorer-10-VBscri
Hmmm....that didn't work very well.  I'll paste it here.

Option Explicit
Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim objShell : Set objShell = CreateObject("WScript.Shell")
Dim objEnv : Set objEnv = objShell.Environment("Process")
objEnv("SEE_MASK_NOZONECHECKS") = 1
Dim strScriptPath : strScriptPath = objFSO.GetParentFolderName(Wscript.ScriptFullName)
Dim LogFile : Set LogFile = objFSO.OpenTextFile("U:\Microsoft_Internet_Explorer_10_VBscript.log", 8, True)
Dim Return, KBname


'Determine OS Bit Level
'---------------------------------------------------------------------------------------------------------------------


Dim OSBitLevel
If GetObject("winmgmts:root\cimv2:Win32_Processor='cpu0'").AddressWidth = 32 Then
	OSBitLevel = 32
ElseIf GetObject("winmgmts:root\cimv2:Win32_Processor='cpu0'").AddressWidth = 64 Then
	OSBitLevel = 64
End If

LogFile.WriteLine vbCrLf & String(117, "-") & vbCrLf


'64-bit installs
'---------------------------------------------------------------------------------------------------------------------


If OSBitLevel = 64 Then


'install 64-bit patch for KB2670838 (graphics and imaging issues fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2670838_x64 for graphics and imaging issues fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2670838-x64.msu /quiet /norestart /log",0,True)
	Results("KB2670838_x64")
	
'install 64-bit patch for KB2729094 (Segoe font fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2729094_x64 for Segoe font fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2729094-v2-x64.msu /quiet /norestart /log",0,True)
	Results("KB2729094_x64")
	
'install 64-bit patch for KB2731771 (local/UTC time conversion)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2731771_x64 for local/UTC time conversion fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2731771-x64.msu /quiet /norestart /log",0,True)
	Results("KB2731771_x64")
	
'install 64-bit patch for KB2533623 (Insecure library fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2533623_x64 for Insecure library fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2533623-x64.msu /quiet /norestart /log",0,True)
	Results("KB2533623_x64")
	
'install 64-bit patch for KB2786081 (IE credentials retention fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2786081_x64 for IE credentials retention fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2786081-x64.msu /quiet /norestart /log",0,True)
	Results("KB2786081_x64")
	
'install Internet Explorer 10 for 64-bit (includes 32-bit)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing Internet Explorer 10 for 64-bit...")
	LogFile.WriteLine(Now & "  -       Install log:  C:\Windows\Logs\Microsoft_IE_10.log")
	'Factory installer:  Return = objShell.Run(strScriptPath & "\IE10-Windows6.1-x64-en-us.exe /quiet /update-no /closeprograms /norestart /log:C:\Windows\Logs\",0,True)
	If objFSO.FolderExists("C:\Windows\SysNative") Then
		'run non-redirect to 64-bit DISM
		Return = objShell.Run("C:\Windows\SysNative\dism.exe /online /add-package /packagepath:" & strScriptPath & "\IE10_x64\IE-Win7.CAB /quiet /norestart /logpath:C:\Windows\Logs\Microsoft_IE_10.log",0,True)
	Else
		Return = objShell.Run("dism.exe /online /add-package /packagepath:" & strScriptPath & "\IE10_x64\IE-Win7.CAB /quiet /norestart /logpath:C:\Windows\Logs\Microsoft_IE_10.log",0,True)
	End If
	If Return = 3010 Then
		LogFile.WriteLine(Now & "  -  WARNING: Installation of Internet Explorer 10 has completed successfully, however, required reboot was suppressed!")
		WScript.Quit(0)
	ElseIf Return <> 0 Then
		LogFile.WriteLine(Now & "  -  ERROR: Installation of Internet Explorer 10 has failed with error: " & RETURN)
	Else
		LogFile.WriteLine(Now & "  -  Installation of Internet Explorer 10 has completed successfully.")
	End If


'32-bit installs
'---------------------------------------------------------------------------------------------------------------------


ElseIf OSBitLevel = 32 Then


'install 32-bit patch for KB2670838 (graphics and imaging issues fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2670838_x86 for graphics and imaging issues fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2670838-x86.msu /quiet /norestart /log",0,True)
	Results("KB2670838_x86")
	
'install 32-bit patch for KB2729094 (Segoe font fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2729094_x86 for Segoe font fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2729094-v2-x86.msu /quiet /norestart /log",0,True)
	Results("KB2729094_x86")
	
'install 32-bit patch for KB2731771 (local/UTC time conversion)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2731771_x86 for local/UTC time conversion fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2731771-x86.msu /quiet /norestart /log",0,True)
	Results("KB2731771_x86")
	
'install 32-bit patch for KB2533623 (Insecure library fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2533623_x86 for Insecure library fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2533623-x86.msu /quiet /norestart /log",0,True)
	Results("KB2533623_x86")
	
'install 32-bit patch for KB2786081 (IE credentials retention fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2786081_x86 for IE credentials retention fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2786081-x86.msu /quiet /norestart /log",0,True)
	Results("KB2786081_x86")
	
'install Internet Explorer 10 for 32-bit
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing Internet Explorer 10...")
	LogFile.WriteLine(Now & "  -       Install log:  C:\Windows\Logs\Microsoft_IE_10.log")
	'Factory installer:  Return = objShell.Run(strScriptPath & "\IE10-Windows6.1-x86-en-us.exe /quiet /update-no /closeprograms /norestart /log:C:\Windows\Logs\",0,True)
	Return = objShell.Run("dism.exe /online /add-package /packagepath:" & strScriptPath & "\IE10_x86\IE-Win7.CAB /quiet /norestart /logpath:C:\Windows\Logs\Microsoft_IE_10.log",0,True)
	If Return = 3010 Then
		LogFile.WriteLine(Now & "  -  WARNING: Installation of Internet Explorer 10 has completed successfully, however, required reboot was suppressed!")
		WScript.Quit(0)
	ElseIf Return <> 0 Then
		LogFile.WriteLine(Now & "  -  ERROR: Installation of Internet Explorer 10 has failed with error: " & RETURN)
	Else
		LogFile.WriteLine(Now & "  -  Installation of Internet Explorer 10 has completed successfully.")
	End If

End If

LogFile.Close


'Functions
'---------------------------------------------------------------------------------------------------------------------


Function Results(KBname)
	Select Case Return
		Case 9009
			LogFile.WriteLine(Now & "  -  WARNING: " & KBname & " is already installed; skipping installation.")
		Case 2359302
			LogFile.WriteLine(Now & "  -  WARNING: " & KBname & " is already installed; skipping installation.")
		Case -2145124329
			LogFile.WriteLine(Now & "  -  WARNING: " & KBname & " is not required for this system; skipping installation.")
		Case Else
			LogFile.WriteLine(Now & "  -  Install of " & KBname & " has completed with return code: " & RETURN)
	End Select
End Function

Open in new window

Here is a screen shot of the Windows Update Standalone Installer.  Also, after I hit OK, the UAC (User Account Control) prompts me.  If I say yes, the WUSI pops up again.  When I click on NO for the UAC, I get the second item in the attached Word file with the location in the script where the error occurs.
U--IE-10-Install-Upgrade-WUSI.docx
I also noticed in the log file error code 87 which refers to a bad parameter.
Hi, so it looks like the /log parameter for wusa.exe needs to actually have a log file specified.  I have added that, and added a variable called strLogFolder for you to specify the log folder in one place.

In terms of admin right, I assume you're on Windows Vista or greater.  When running the script manually, do the following:
   Click Start --> All Programs --> Accessories
   Right click Command Prompt, and click Run As Administrator
   Click Yes on the UAC prompt and enter admin credentials if required
   Run cscript U:\Install_IE10.vbs and press Enter, substituting the script name with whatever you called it

That should run it will elevated rights, and in theory, work properly.  To avoid the "Permission Denied" error from Kaspersky, you will need to try to have the task run with elevated rights.  I think you would be looking at application privilege control settings, and setting it to Trusted.

' Source: http://www.itninja.com/question/ie-10-silent-install-with-updates
Option Explicit
Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim objShell : Set objShell = CreateObject("WScript.Shell")
Dim objEnv : Set objEnv = objShell.Environment("Process")
objEnv("SEE_MASK_NOZONECHECKS") = 1
Dim strScriptPath : strScriptPath = objFSO.GetParentFolderName(Wscript.ScriptFullName)
Dim strLogFolder : strLogFolder = "U:\"
Dim LogFile : Set LogFile = objFSO.OpenTextFile(strLogFolder & "Microsoft_Internet_Explorer_10_VBscript.log", 8, True)
Dim Return, KBname


'Determine OS Bit Level
'---------------------------------------------------------------------------------------------------------------------


Dim OSBitLevel
If GetObject("winmgmts:root\cimv2:Win32_Processor='cpu0'").AddressWidth = 32 Then
	OSBitLevel = 32
ElseIf GetObject("winmgmts:root\cimv2:Win32_Processor='cpu0'").AddressWidth = 64 Then
	OSBitLevel = 64
End If

LogFile.WriteLine vbCrLf & String(117, "-") & vbCrLf


'64-bit installs
'---------------------------------------------------------------------------------------------------------------------


If OSBitLevel = 64 Then


'install 64-bit patch for KB2670838 (graphics and imaging issues fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2670838_x64 for graphics and imaging issues fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2670838-x64.msu /quiet /norestart /log:" & strLogFolder & "KB2670838_x64.log",0,True)
	Results("KB2670838_x64")
	
'install 64-bit patch for KB2729094 (Segoe font fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2729094_x64 for Segoe font fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2729094-v2-x64.msu /quiet /norestart /log:" & strLogFolder & "KB2729094_x64.log",0,True)
	Results("KB2729094_x64")
	
'install 64-bit patch for KB2731771 (local/UTC time conversion)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2731771_x64 for local/UTC time conversion fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2731771-x64.msu /quiet /norestart /log:" & strLogFolder & "KB2731771_x64.log",0,True)
	Results("KB2731771_x64")
	
'install 64-bit patch for KB2533623 (Insecure library fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2533623_x64 for Insecure library fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2533623-x64.msu /quiet /norestart /log:" & strLogFolder & "KB2533623_x64.log",0,True)
	Results("KB2533623_x64")
	
'install 64-bit patch for KB2786081 (IE credentials retention fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2786081_x64 for IE credentials retention fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2786081-x64.msu /quiet /norestart /log:" & strLogFolder & "KB2786081_x64.log",0,True)
	Results("KB2786081_x64")
	
'install Internet Explorer 10 for 64-bit (includes 32-bit)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing Internet Explorer 10 for 64-bit...")
	LogFile.WriteLine(Now & "  -       Install log:  " & strLogFolder & "Microsoft_IE_10.log")
	'Factory installer:  Return = objShell.Run(strScriptPath & "\IE10-Windows6.1-x64-en-us.exe /quiet /update-no /closeprograms /norestart /log:C:\Windows\Logs\",0,True)
	If objFSO.FolderExists("C:\Windows\SysNative") Then
		'run non-redirect to 64-bit DISM
		Return = objShell.Run("C:\Windows\SysNative\dism.exe /online /add-package /packagepath:" & strScriptPath & "\IE10_x64\IE-Win7.CAB /quiet /norestart /logpath:" & strLogFolder & "Microsoft_IE_10.log",0,True)
	Else
		Return = objShell.Run("dism.exe /online /add-package /packagepath:" & strScriptPath & "\IE10_x64\IE-Win7.CAB /quiet /norestart /logpath:" & strLogFolder & "Microsoft_IE_10.log",0,True)
	End If
	If Return = 3010 Then
		LogFile.WriteLine(Now & "  -  WARNING: Installation of Internet Explorer 10 has completed successfully, however, required reboot was suppressed!")
		WScript.Quit(0)
	ElseIf Return <> 0 Then
		LogFile.WriteLine(Now & "  -  ERROR: Installation of Internet Explorer 10 has failed with error: " & RETURN)
	Else
		LogFile.WriteLine(Now & "  -  Installation of Internet Explorer 10 has completed successfully.")
	End If


'32-bit installs
'---------------------------------------------------------------------------------------------------------------------


ElseIf OSBitLevel = 32 Then


'install 32-bit patch for KB2670838 (graphics and imaging issues fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2670838_x86 for graphics and imaging issues fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2670838-x86.msu /quiet /norestart /log:" & strLogFolder & "KB2670838_x86.log",0,True)
	Results("KB2670838_x86")
	
'install 32-bit patch for KB2729094 (Segoe font fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2729094_x86 for Segoe font fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2729094-v2-x86.msu /quiet /norestart /log:" & strLogFolder & "KB2729094_x86.log",0,True)
	Results("KB2729094_x86")
	
'install 32-bit patch for KB2731771 (local/UTC time conversion)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2731771_x86 for local/UTC time conversion fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2731771-x86.msu /quiet /norestart /log:" & strLogFolder & "KB2731771_x86.log",0,True)
	Results("KB2731771_x86")
	
'install 32-bit patch for KB2533623 (Insecure library fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2533623_x86 for Insecure library fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2533623-x86.msu /quiet /norestart /log:" & strLogFolder & "KB2533623_x86.log",0,True)
	Results("KB2533623_x86")
	
'install 32-bit patch for KB2786081 (IE credentials retention fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2786081_x86 for IE credentials retention fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2786081-x86.msu /quiet /norestart /log:" & strLogFolder & "KB2786081_x86.log",0,True)
	Results("KB2786081_x86")
	
'install Internet Explorer 10 for 32-bit
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing Internet Explorer 10...")
	LogFile.WriteLine(Now & "  -       Install log:  " & strLogFolder & "Microsoft_IE_10.log")
	'Factory installer:  Return = objShell.Run(strScriptPath & "\IE10-Windows6.1-x86-en-us.exe /quiet /update-no /closeprograms /norestart /log:C:\Windows\Logs\",0,True)
	Return = objShell.Run("dism.exe /online /add-package /packagepath:" & strScriptPath & "\IE10_x86\IE-Win7.CAB /quiet /norestart /logpath:" & strLogFolder & "Microsoft_IE_10.log",0,True)
	If Return = 3010 Then
		LogFile.WriteLine(Now & "  -  WARNING: Installation of Internet Explorer 10 has completed successfully, however, required reboot was suppressed!")
		WScript.Quit(0)
	ElseIf Return <> 0 Then
		LogFile.WriteLine(Now & "  -  ERROR: Installation of Internet Explorer 10 has failed with error: " & RETURN)
	Else
		LogFile.WriteLine(Now & "  -  Installation of Internet Explorer 10 has completed successfully.")
	End If

End If

LogFile.Close


'Functions
'---------------------------------------------------------------------------------------------------------------------


Function Results(KBname)
	Select Case Return
		Case 9009
			LogFile.WriteLine(Now & "  -  WARNING: " & KBname & " is already installed; skipping installation.")
		Case 2359302
			LogFile.WriteLine(Now & "  -  WARNING: " & KBname & " is already installed; skipping installation.")
		Case -2145124329
			LogFile.WriteLine(Now & "  -  WARNING: " & KBname & " is not required for this system; skipping installation.")
		Case Else
			LogFile.WriteLine(Now & "  -  Install of " & KBname & " has completed with return code: " & RETURN)
	End Select
End Function

Open in new window

Rob,

Thanks again man.  I will try this again tomorrow and let you know.  Great job!
Rob,

Well, I copied the script, looked it over to see if everything was correct, which it was, ran it again and I am getting the same error code 87:bad parameter.  Any suggestions?
Line 87 is a line that writes to the log file.  Is there other information being written to the log file?  That seems odd that one write would fail.

It should be getting to the end of the install if it is logging that last line.....

Rob.
Rob,

Line 87 has nothing to do with the error.  The 87 is the actual error code written in the log file.  I will include the log file so you can see.  Looks to me like we are not playing nicely with the command's switches.
U--Microsoft-Internet-Explorer-10-VBscri
Oh, sorry. I misunderstood what you meant with the error.

Try this.  I have wrapped the log path with quotes to see if that's the problem.

' Source: http://www.itninja.com/question/ie-10-silent-install-with-updates
Option Explicit
Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim objShell : Set objShell = CreateObject("WScript.Shell")
Dim objEnv : Set objEnv = objShell.Environment("Process")
objEnv("SEE_MASK_NOZONECHECKS") = 1
Dim strScriptPath : strScriptPath = objFSO.GetParentFolderName(Wscript.ScriptFullName)
Dim strLogFolder : strLogFolder = "U:\"
Dim LogFile : Set LogFile = objFSO.OpenTextFile(strLogFolder & "Microsoft_Internet_Explorer_10_VBscript.log", 8, True)
Dim Return, KBname


'Determine OS Bit Level
'---------------------------------------------------------------------------------------------------------------------


Dim OSBitLevel
If GetObject("winmgmts:root\cimv2:Win32_Processor='cpu0'").AddressWidth = 32 Then
	OSBitLevel = 32
ElseIf GetObject("winmgmts:root\cimv2:Win32_Processor='cpu0'").AddressWidth = 64 Then
	OSBitLevel = 64
End If

LogFile.WriteLine vbCrLf & String(117, "-") & vbCrLf


'64-bit installs
'---------------------------------------------------------------------------------------------------------------------


If OSBitLevel = 64 Then


'install 64-bit patch for KB2670838 (graphics and imaging issues fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2670838_x64 for graphics and imaging issues fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2670838-x64.msu /quiet /norestart /log:""" & strLogFolder & "KB2670838_x64.log""",0,True)
	Results("KB2670838_x64")
	
'install 64-bit patch for KB2729094 (Segoe font fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2729094_x64 for Segoe font fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2729094-v2-x64.msu /quiet /norestart /log:""" & strLogFolder & "KB2729094_x64.log""",0,True)
	Results("KB2729094_x64")
	
'install 64-bit patch for KB2731771 (local/UTC time conversion)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2731771_x64 for local/UTC time conversion fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2731771-x64.msu /quiet /norestart /log:""" & strLogFolder & "KB2731771_x64.log""",0,True)
	Results("KB2731771_x64")
	
'install 64-bit patch for KB2533623 (Insecure library fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2533623_x64 for Insecure library fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2533623-x64.msu /quiet /norestart /log:""" & strLogFolder & "KB2533623_x64.log""",0,True)
	Results("KB2533623_x64")
	
'install 64-bit patch for KB2786081 (IE credentials retention fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2786081_x64 for IE credentials retention fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2786081-x64.msu /quiet /norestart /log:""" & strLogFolder & "KB2786081_x64.log""",0,True)
	Results("KB2786081_x64")
	
'install Internet Explorer 10 for 64-bit (includes 32-bit)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing Internet Explorer 10 for 64-bit...")
	LogFile.WriteLine(Now & "  -       Install log:  " & strLogFolder & "Microsoft_IE_10.log")
	'Factory installer:  Return = objShell.Run(strScriptPath & "\IE10-Windows6.1-x64-en-us.exe /quiet /update-no /closeprograms /norestart /log:C:\Windows\Logs\",0,True)
	If objFSO.FolderExists("C:\Windows\SysNative") Then
		'run non-redirect to 64-bit DISM
		Return = objShell.Run("C:\Windows\SysNative\dism.exe /online /add-package /packagepath:" & strScriptPath & "\IE10_x64\IE-Win7.CAB /quiet /norestart /logpath:""" & strLogFolder & "Microsoft_IE_10.log""",0,True)
	Else
		Return = objShell.Run("dism.exe /online /add-package /packagepath:" & strScriptPath & "\IE10_x64\IE-Win7.CAB /quiet /norestart /logpath:""" & strLogFolder & "Microsoft_IE_10.log""",0,True)
	End If
	If Return = 3010 Then
		LogFile.WriteLine(Now & "  -  WARNING: Installation of Internet Explorer 10 has completed successfully, however, required reboot was suppressed!")
		WScript.Quit(0)
	ElseIf Return <> 0 Then
		LogFile.WriteLine(Now & "  -  ERROR: Installation of Internet Explorer 10 has failed with error: " & RETURN)
	Else
		LogFile.WriteLine(Now & "  -  Installation of Internet Explorer 10 has completed successfully.")
	End If


'32-bit installs
'---------------------------------------------------------------------------------------------------------------------


ElseIf OSBitLevel = 32 Then


'install 32-bit patch for KB2670838 (graphics and imaging issues fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2670838_x86 for graphics and imaging issues fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2670838-x86.msu /quiet /norestart /log:""" & strLogFolder & "KB2670838_x86.log""",0,True)
	Results("KB2670838_x86")
	
'install 32-bit patch for KB2729094 (Segoe font fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2729094_x86 for Segoe font fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2729094-v2-x86.msu /quiet /norestart /log:""" & strLogFolder & "KB2729094_x86.log""",0,True)
	Results("KB2729094_x86")
	
'install 32-bit patch for KB2731771 (local/UTC time conversion)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2731771_x86 for local/UTC time conversion fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2731771-x86.msu /quiet /norestart /log:""" & strLogFolder & "KB2731771_x86.log""",0,True)
	Results("KB2731771_x86")
	
'install 32-bit patch for KB2533623 (Insecure library fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2533623_x86 for Insecure library fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2533623-x86.msu /quiet /norestart /log:""" & strLogFolder & "KB2533623_x86.log""",0,True)
	Results("KB2533623_x86")
	
'install 32-bit patch for KB2786081 (IE credentials retention fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2786081_x86 for IE credentials retention fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2786081-x86.msu /quiet /norestart /log:""" & strLogFolder & "KB2786081_x86.log""",0,True)
	Results("KB2786081_x86")
	
'install Internet Explorer 10 for 32-bit
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing Internet Explorer 10...")
	LogFile.WriteLine(Now & "  -       Install log:  " & strLogFolder & "Microsoft_IE_10.log")
	'Factory installer:  Return = objShell.Run(strScriptPath & "\IE10-Windows6.1-x86-en-us.exe /quiet /update-no /closeprograms /norestart /log:C:\Windows\Logs\",0,True)
	Return = objShell.Run("dism.exe /online /add-package /packagepath:" & strScriptPath & "\IE10_x86\IE-Win7.CAB /quiet /norestart /logpath:""" & strLogFolder & "Microsoft_IE_10.log""",0,True)
	If Return = 3010 Then
		LogFile.WriteLine(Now & "  -  WARNING: Installation of Internet Explorer 10 has completed successfully, however, required reboot was suppressed!")
		WScript.Quit(0)
	ElseIf Return <> 0 Then
		LogFile.WriteLine(Now & "  -  ERROR: Installation of Internet Explorer 10 has failed with error: " & RETURN)
	Else
		LogFile.WriteLine(Now & "  -  Installation of Internet Explorer 10 has completed successfully.")
	End If

End If

LogFile.Close


'Functions
'---------------------------------------------------------------------------------------------------------------------


Function Results(KBname)
	Select Case Return
		Case 9009
			LogFile.WriteLine(Now & "  -  WARNING: " & KBname & " is already installed; skipping installation.")
		Case 2359302
			LogFile.WriteLine(Now & "  -  WARNING: " & KBname & " is already installed; skipping installation.")
		Case -2145124329
			LogFile.WriteLine(Now & "  -  WARNING: " & KBname & " is not required for this system; skipping installation.")
		Case Else
			LogFile.WriteLine(Now & "  -  Install of " & KBname & " has completed with return code: " & RETURN)
	End Select
End Function

Open in new window


If that fails, we can try without explicit per install logging, and just write the return code to the main log.

' Source: http://www.itninja.com/question/ie-10-silent-install-with-updates
Option Explicit
Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim objShell : Set objShell = CreateObject("WScript.Shell")
Dim objEnv : Set objEnv = objShell.Environment("Process")
objEnv("SEE_MASK_NOZONECHECKS") = 1
Dim strScriptPath : strScriptPath = objFSO.GetParentFolderName(Wscript.ScriptFullName)
Dim strLogFolder : strLogFolder = "U:\"
Dim LogFile : Set LogFile = objFSO.OpenTextFile(strLogFolder & "Microsoft_Internet_Explorer_10_VBscript.log", 8, True)
Dim Return, KBname


'Determine OS Bit Level
'---------------------------------------------------------------------------------------------------------------------


Dim OSBitLevel
If GetObject("winmgmts:root\cimv2:Win32_Processor='cpu0'").AddressWidth = 32 Then
	OSBitLevel = 32
ElseIf GetObject("winmgmts:root\cimv2:Win32_Processor='cpu0'").AddressWidth = 64 Then
	OSBitLevel = 64
End If

LogFile.WriteLine vbCrLf & String(117, "-") & vbCrLf


'64-bit installs
'---------------------------------------------------------------------------------------------------------------------


If OSBitLevel = 64 Then


'install 64-bit patch for KB2670838 (graphics and imaging issues fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2670838_x64 for graphics and imaging issues fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2670838-x64.msu /quiet /norestart",0,True)
	Results("KB2670838_x64")
	
'install 64-bit patch for KB2729094 (Segoe font fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2729094_x64 for Segoe font fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2729094-v2-x64.msu /quiet /norestart",0,True)
	Results("KB2729094_x64")
	
'install 64-bit patch for KB2731771 (local/UTC time conversion)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2731771_x64 for local/UTC time conversion fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2731771-x64.msu /quiet /norestart",0,True)
	Results("KB2731771_x64")
	
'install 64-bit patch for KB2533623 (Insecure library fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2533623_x64 for Insecure library fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2533623-x64.msu /quiet /norestart",0,True)
	Results("KB2533623_x64")
	
'install 64-bit patch for KB2786081 (IE credentials retention fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2786081_x64 for IE credentials retention fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2786081-x64.msu /quiet /norestart",0,True)
	Results("KB2786081_x64")
	
'install Internet Explorer 10 for 64-bit (includes 32-bit)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing Internet Explorer 10 for 64-bit...")
	LogFile.WriteLine(Now & "  -       Install log:  " & strLogFolder & "Microsoft_IE_10.log")
	'Factory installer:  Return = objShell.Run(strScriptPath & "\IE10-Windows6.1-x64-en-us.exe /quiet /update-no /closeprograms /norestart /log:C:\Windows\Logs\",0,True)
	If objFSO.FolderExists("C:\Windows\SysNative") Then
		'run non-redirect to 64-bit DISM
		Return = objShell.Run("C:\Windows\SysNative\dism.exe /online /add-package /packagepath:" & strScriptPath & "\IE10_x64\IE-Win7.CAB /quiet /norestart",0,True)
	Else
		Return = objShell.Run("dism.exe /online /add-package /packagepath:" & strScriptPath & "\IE10_x64\IE-Win7.CAB /quiet /norestart",0,True)
	End If
	If Return = 3010 Then
		LogFile.WriteLine(Now & "  -  WARNING: Installation of Internet Explorer 10 has completed successfully, however, required reboot was suppressed!")
		WScript.Quit(0)
	ElseIf Return <> 0 Then
		LogFile.WriteLine(Now & "  -  ERROR: Installation of Internet Explorer 10 has failed with error: " & RETURN)
	Else
		LogFile.WriteLine(Now & "  -  Installation of Internet Explorer 10 has completed successfully.")
	End If


'32-bit installs
'---------------------------------------------------------------------------------------------------------------------


ElseIf OSBitLevel = 32 Then


'install 32-bit patch for KB2670838 (graphics and imaging issues fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2670838_x86 for graphics and imaging issues fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2670838-x86.msu /quiet /norestart",0,True)
	Results("KB2670838_x86")
	
'install 32-bit patch for KB2729094 (Segoe font fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2729094_x86 for Segoe font fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2729094-v2-x86.msu /quiet /norestart",0,True)
	Results("KB2729094_x86")
	
'install 32-bit patch for KB2731771 (local/UTC time conversion)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2731771_x86 for local/UTC time conversion fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2731771-x86.msu /quiet /norestart",0,True)
	Results("KB2731771_x86")
	
'install 32-bit patch for KB2533623 (Insecure library fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2533623_x86 for Insecure library fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2533623-x86.msu /quiet /norestart",0,True)
	Results("KB2533623_x86")
	
'install 32-bit patch for KB2786081 (IE credentials retention fix)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing update KB2786081_x86 for IE credentials retention fix...")
	Return = objShell.Run("wusa.exe " & strScriptPath & "\Windows6.1-KB2786081-x86.msu /quiet /norestart",0,True)
	Results("KB2786081_x86")
	
'install Internet Explorer 10 for 32-bit
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing Internet Explorer 10...")
	LogFile.WriteLine(Now & "  -       Install log:  " & strLogFolder & "Microsoft_IE_10.log")
	'Factory installer:  Return = objShell.Run(strScriptPath & "\IE10-Windows6.1-x86-en-us.exe /quiet /update-no /closeprograms /norestart /log:C:\Windows\Logs\",0,True)
	Return = objShell.Run("dism.exe /online /add-package /packagepath:" & strScriptPath & "\IE10_x86\IE-Win7.CAB /quiet /norestart",0,True)
	If Return = 3010 Then
		LogFile.WriteLine(Now & "  -  WARNING: Installation of Internet Explorer 10 has completed successfully, however, required reboot was suppressed!")
		WScript.Quit(0)
	ElseIf Return <> 0 Then
		LogFile.WriteLine(Now & "  -  ERROR: Installation of Internet Explorer 10 has failed with error: " & RETURN)
	Else
		LogFile.WriteLine(Now & "  -  Installation of Internet Explorer 10 has completed successfully.")
	End If

End If

LogFile.Close


'Functions
'---------------------------------------------------------------------------------------------------------------------


Function Results(KBname)
	Select Case Return
		Case 9009
			LogFile.WriteLine(Now & "  -  WARNING: " & KBname & " is already installed; skipping installation.")
		Case 2359302
			LogFile.WriteLine(Now & "  -  WARNING: " & KBname & " is already installed; skipping installation.")
		Case -2145124329
			LogFile.WriteLine(Now & "  -  WARNING: " & KBname & " is not required for this system; skipping installation.")
		Case Else
			LogFile.WriteLine(Now & "  -  Install of " & KBname & " has completed with return code: " & RETURN)
	End Select
End Function

Open in new window


Rob.
Rob,

Well, all of our efforts so far have not worked.  I think we need to go back to the beginning.  If you could help me build a script that determines the bit level and then just launches the executable for that bit level, that would be where I am thinking of going.  I just ran the executable on my computer and the install went through without a hitch.  I was prompted by the UAC and another Microsoft prompt, but we should be able to use a switch to suppress those I would imagine?  Anyhow, that is where I am headed.  Let me know your thoughts please?

Thanks,
Mike
Here are the two executable file names:

IE10-Windows6.1-x86-en-us.exe
IE10-Windows6.1-x64-en-us.exe
SOLUTION
Avatar of cheesebugah
cheesebugah
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Sorry I haven't been in a position to test this.  I normally would, but I don't have a test system I can install IE10 onto.

So the latest code you're using is running the .CAB files to do the install.  If that works, then it will be fine.  The factory install command is if you want to use the full .EXE directly, which from what we are reading, will check for the prerequisites, and may not work properly.  Try it with the .CAB files as you have it (which are still required to be extracted) and see how it goes.

If I get a chance to snapshot a machine in the next couple of days, I will see if I can test it.

Regards,

Rob.
Rob,

Okay, that didn't work either.  So, I just ran the executable (IE10-Windows6.1-x64-en-us.exe, via Kaspersky, with these switches:

/quiet
/update-no
/closeprograms
/norestart

and it installed just fine?  What the.......?

So, I need to rewrite the script to determine bit level and then just run the corresponding executable.  I will post what I have when I've finished rewriting the script.  I will then test again and let you know.

Thanks,
Mike
So I think I need to go back to creating a log file locally, C:\Temp, as there may or may not be a U drive on certain computers.  At least I don't think we had any issues with creating this folder?  I am able to create it on my machine without admin rights okay.
Wow, talk about those other conversations leading us down the garden path ;-)

So this is a much shorter script that will just determine the bitness, create the log folder if it doesn't exist (ie C:\Temp) and install just the original .exe with the switches you mentioned.

Regards,

Rob.

Option Explicit
Dim objFSO : Set objFSO = CreateObject("Scripting.FileSystemObject")
Dim objShell : Set objShell = CreateObject("WScript.Shell")
Dim objEnv : Set objEnv = objShell.Environment("Process")
objEnv("SEE_MASK_NOZONECHECKS") = 1
Dim strScriptPath : strScriptPath = objFSO.GetParentFolderName(Wscript.ScriptFullName)
Dim strLogFolder : strLogFolder = "C:\Temp\"
If objFSO.FolderExists(strLogFolder) = False Then objFSO.CreateFolder strLogFolder
Dim LogFile : Set LogFile = objFSO.OpenTextFile(strLogFolder & "Microsoft_Internet_Explorer_10_VBscript.log", 8, True)
Dim Return, KBname


'Determine OS Bit Level
'---------------------------------------------------------------------------------------------------------------------


Dim OSBitLevel
If GetObject("winmgmts:root\cimv2:Win32_Processor='cpu0'").AddressWidth = 32 Then
	OSBitLevel = 32
ElseIf GetObject("winmgmts:root\cimv2:Win32_Processor='cpu0'").AddressWidth = 64 Then
	OSBitLevel = 64
End If

LogFile.WriteLine vbCrLf & String(117, "-") & vbCrLf


'64-bit install
'---------------------------------------------------------------------------------------------------------------------


If OSBitLevel = 64 Then


'install Internet Explorer 10 for 64-bit (includes 32-bit)
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing Internet Explorer 10 for 64-bit...")
	LogFile.WriteLine(Now & "  -       Install log:  " & strLogFolder & "Microsoft_IE_10.log")
	'Factory installer:  Return = objShell.Run(strScriptPath & "\IE10-Windows6.1-x64-en-us.exe /quiet /update-no /closeprograms /norestart /log:U:\",0,True)
	Return = objShell.Run(strScriptPath & "\IE10-Windows6.1-x64-en-us.exe /quiet /update-no /closeprograms /norestart",0,True)
	If Return = 3010 Then
		LogFile.WriteLine(Now & "  -  WARNING: Installation of Internet Explorer 10 has completed successfully, however, required reboot was suppressed!")
		WScript.Quit(0)
	ElseIf Return <> 0 Then
		LogFile.WriteLine(Now & "  -  ERROR: Installation of Internet Explorer 10 has failed with error: " & RETURN)
	Else
		LogFile.WriteLine(Now & "  -  Installation of Internet Explorer 10 has completed successfully.")
	End If


'32-bit installs
'---------------------------------------------------------------------------------------------------------------------


ElseIf OSBitLevel = 32 Then

	
'install Internet Explorer 10 for 32-bit
'---------------------------------------------------------------------------------------------------------------------

	LogFile.WriteLine(Now & "  -  Installing Internet Explorer 10 for 32 bit...")
	LogFile.WriteLine(Now & "  -       Install log:  " & strLogFolder & "Microsoft_IE_10.log")
	'Factory installer:  Return = objShell.Run(strScriptPath & "\IE10-Windows6.1-x86-en-us.exe /quiet /update-no /closeprograms /norestart /log:U:\",0,True)
	Return = objShell.Run(strScriptPath & "\IE10-Windows6.1-x86-en-us.exe /quiet /update-no /closeprograms /norestart",0,True)
	If Return = 3010 Then
		LogFile.WriteLine(Now & "  -  WARNING: Installation of Internet Explorer 10 has completed successfully, however, required reboot was suppressed!")
		WScript.Quit(0)
	ElseIf Return <> 0 Then
		LogFile.WriteLine(Now & "  -  ERROR: Installation of Internet Explorer 10 has failed with error: " & RETURN)
	Else
		LogFile.WriteLine(Now & "  -  Installation of Internet Explorer 10 has completed successfully.")
	End If

End If

LogFile.Close


'Functions
'---------------------------------------------------------------------------------------------------------------------


Function Results(KBname)
	Select Case Return
		Case 9009
			LogFile.WriteLine(Now & "  -  WARNING: " & KBname & " is already installed; skipping installation.")
		Case 2359302
			LogFile.WriteLine(Now & "  -  WARNING: " & KBname & " is already installed; skipping installation.")
		Case -2145124329
			LogFile.WriteLine(Now & "  -  WARNING: " & KBname & " is not required for this system; skipping installation.")
		Case Else
			LogFile.WriteLine(Now & "  -  Install of " & KBname & " has completed with return code: " & RETURN)
	End Select
End Function

Open in new window

Geez!  This is killing me.  I think we need to take out the log file completely.  Let's just determine bit level and then run the executable, period.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Rob,

None of these scripts have worked via Kaspersky.  I do not know why yet?  I was on the phone with them today addressing a different issue and posed the question and the tech did not know?  They are going to get back to me.  What does seem to work is just running the factory executable with the /quiet /update-no /closeprograms /norestart switches.  Talk about taking the long way home!  I am beginning deployment with this method.  I will post updates on how this goes and what Kaspersky has to say.  Until then, thanks again for all of your help.

Thanks,
Mike
The only reason I can think for this is that the script is not running with full admin rights, or requires extra elevation.  We have simplified it to the one command that works for you manually, so it seems odd that Kaspersky won't run it.
Rob,

If I just run the factory executable on a workstation logged in as a domain admin, it works just fine.  If I attempt any other scenario, it bombs.  The package I am using on Kaspersky with good success is running the factory executable with my domain admin rights, that's it.  We do have a high level of security here, so I am assuming something is blocking it.  I am fairly new here, so at this point I am not quite sure.  So far, so good though with the current package.  We'll see what Kaspersky has to say about it though.

Thanks,
Mike
After going totally sideways on this, what finally worked was just running the factory executable with the switches provided in the script.  That is it!