On Error Resume Next Const HKEY_CURRENT_USER = &H80000001 strComputer = "." ' for localhost intMenu = InputBox(" Hello ! Input 1,2 or 3 for ..." & vbcrlf & _ "1. Add some sites to the trusted sites list" & vbcrlf & _ "2. Add sites to the Pop UP Blocker exception list" & vbcrlf & _ "3. Increase the disk space size for browsing history") Select Case intMenu Case 1 ' Add some sites to the trusted sites list sitename = "www." + InputBox( "Input WebSite Name for add to IE Trusted Sites List") intResp = MsgBox("Click OK to add " & chr(34) & sitename & chr(34) & " to add to IE Trusted Sites List." & chr(13) & chr(10) _ & "Otherwise, click CANCEL", 1, "Allow popups from this site?") if intResp = 2 then wscript.echo "Exit" wscript.quit end if Set objReg = GetObject("winmgmts:" & "{impersonationLevel=impersonate}\\" & strComputer & "\root\default:StdRegProv") strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\" _ & "ZoneMap\Domains\" & sitename objReg.CreateKey HKEY_CURRENT_USER,strKeyPath strValueName = "http" dwValue = 2 objReg.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue wscript.echo "You have successfully added " & vbcrlf & _ sitename & " to IE Trusted Sites List" '------------------------------------------------- Case 2 ' Add sites to the Pop UP Blocker exception list SiteName = "www." + InputBox( "Input WebSite Name for add to IE Popup Blocker ") intResp = MsgBox("Click OK to add " & chr(34) & SiteName & chr(34) & " to IE 6 Popup Blocker." & chr(13) & chr(10) _ & "Otherwise, click CANCEL", 1, "Allow popups from this site?") if intResp = 2 then wscript.echo "Popup blocker exclusion NOT allowed by user" wscript.quit end if 'otherwise, do the job Set objRegistry=GetObject("winmgmts:\\" & _ strComputer & "\root\default:StdRegProv") strKeyPath = "Software\Microsoft\Internet Explorer\New Windows\Allow\" objRegistry.CreateKey HKEY_CURRENT_USER, strKeyPath arrValues = Array() objRegistry.SetBinaryValue HKEY_CURRENT_USER, strKeyPath, SiteName, arrValues wscript.echo "You have successfully added " & vbcrlf & _ SiteName & " to IE Popup Blocker" '------------------------------------------------- Case 3 'Increase the disk space size for browsing history Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv") strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\5.0\Cache\Content" strValueName = "CacheLimit" Value = InputBox( "Input new Disk Space Size for Browsing History by MB") dwValue = Value*1024 objRegistry.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\Cache\Content" objRegistry.SetDWORDValue HKEY_CURRENT_USER,strKeyPath,strValueName,dwValue wscript.echo "Now the disk space size for browsing history is " & Value & " MB" Case else wscript.echo "Incorrect Input!!!" End Select