Adicionar proxy no IE com pergunta Yes ou No

30/08/2012 10:18
dim oShell
set oShell = Wscript.CreateObject("Wscript.Shell")
 
if msgbox("Habilitar Proxy?", vbQuestion or vbYesNo) = vbYes then
oShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable", 1, "REG_DWORD"
oShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\currentVersion\Internet Settings\ProxyServer", "192.168.10.252:3128", "REG_SZ"
oShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyOverride","192.168.10.0"
else
oShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable", 0, "REG_DWORD"
 
End if
 
Set oShell = Nothing