site = "ecolecatholique.ca" Dim status Dim message message = "Begin Registry Tests
" status = "All Keys Set" Set oShell = WScript.CreateObject( "WScript.Shell" ) message = message & "Begin Local Intranet site test
" on Error Resume Next result = oShell.RegRead( "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\" & site & "\*" ) if Err.number <> 0 Then ' try setting Local Intranet Site message = message & ">Local Intranet site does not exists
" Set objRegistry = GetObject( "winmgmts:root\default:StdRegProv" ) strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1" strValueName = "Flags" objRegistry.GetDWORDValue &H80000001,strKeyPath,strValueName,dwValue objRegistry.SetDWORDValue &H80000001,strKeyPath,strValueName,(dwValue AND &HFFFFFFFB) oShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\" & site & "\*","1","REG_DWORD" message = message & ">Local Intranet site added
" status = "Restart Required" Else message = message & "Local Intranet site does exists
" End If on Error Goto 0 message = message & "End Local Intranet site test
" message = message & "Begin RDP client key test
" on Error Resume Next result = oShell.RegRead( "HKCU\Software\Microsoft\Windows\CurrentVersion\Ext\Stats\{6A6F4B83-45C5-4CA9-BDD9-0D81C12295E4}\iexplore\AllowedDomains\*" ) if Err.number <> 0 Then ' try installing RDP Client message = message & "RDP client key does not exists
" oShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Ext\Stats\{6A6F4B83-45C5-4CA9-BDD9-0D81C12295E4}\iexplore\AllowedDomains\*","0","REG_DWORD" oShell.RegWrite "HKEY_USERS\S-1-5-21-3190274708-3948209112-161260126-500\Software\Microsoft\Windows\CurrentVersion\Ext\\Stats\{6A6F4B83-45C5-4CA9-BDD9-0D81C12295E4}\iexplore\AllowedDomains\*","0","REG_DWORD" message = message & "RDP client key site added
" status = "Restart Required" Else message = message & "RDP client key does exists
" End If on Error Goto 0 message = message & "End RDP client key test
" message = message & "Begin Popup Blocker key test
" on Error Resume Next result = oShell.RegRead( "HKCU\Software\Microsoft\Internet Explorer\New Windows\Allow\*." & site ) if Err.number <> 0 Then ' try setting URL for Popup Blocker message = message & "Popup Blocker key does not exists
" oShell.RegWrite "HKCU\Software\Microsoft\Internet Explorer\New Windows\Allow\*." & site, 0000,"REG_BINARY" message = message & "Popup Blocker key added
" status = "Restart Required" Else message = message & "Popup Blocker key does exists
" End If on Error Goto 0 message = message & "End Popup Blocker key test
" on Error Resume Next oShell.RegWrite "HKCU\Software\Microsoft\Active Setup\Declined Install On Demand IEv5\{08B0e5c0-4FCB-11CF-AAA5-00401C608501}", "","REG_SZ" if Err.number <> 0 Then ' Error thrown when trying to write to disable MS Java message registry key status = "Unable to modify registry" Else End If on Error Goto 0 WScript.Echo message & status WScript.quit