Run A Command Based on Registry Value

By | March 24, 2009

We have been having some problems with our Oracle system where users get a “spinning ball” that makes the users think it is processing when it is really doing nothing. Oracle states that it is because of an out dated registry setting(HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\MaxConnectionsPerServer) which they wanted us to change. We started to apply this to a couple users and it did work. Microsoft even says that internet standards have changed and they recommend changing the value.( )

We found that on some computers this value was either 2 or it doesn’t exist so this script accounts for if it doesn’t exist.

Click on the link above and download the FIX IT msi and save it in a share location you run your scripts from



Dim objShell, strCmd
strComputer = “.”
Set oReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!\\” &strComputer & “\root\default:StdRegProv”)
strKeyPath = “Software\Microsoft\Windows\CurrentVersion\Internet Settings”
strValueName = “MaxConnectionsPerServer”
oReg.GetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue

if dwValue <> 10 then
‘wscript.echo “Installing because it isn’t 10”                
Set objShell = WScript.CreateObject(“WScript.Shell”)
strCmd = “msiexec.exe /i \\DOMAIN.COM\NETLOGON\enableTenIEDownloadsessions.msi /quiet”
objShell.Run strCmd,1,True    
else if IsNull(dwValue) then
‘wscript.echo “Installing because it doesn’t exist”
Set objShell = WScript.CreateObject(“WScript.Shell”)
strCmd = “msiexec.exe /i \\DOMAIN.COM\NETLOGON\enableTenIEDownloadsessions.msi /quiet”
objShell.Run strCmd,1,True
else if dwValue = 10 then
‘wscript.echo “Do Nothing because it is 10”
End if
End if
End if



Copy and paste the text into notepad, MAKE SURE THERE IS NO WORD WRAP, and save it as EnableIE10Connect.vbs

Save it in the same folder as the msi you downloaded above

Create a group policy and have it run EnableIE10Connect.vbs or add it to your existing logon script you run.



This information is provided “AS IS” with no warranties expressed or implied.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.