set shell = createobject("wscript.shell")
key = _
"HKEY_CURRENT_USER\Software\" _
& "Microsoft\Windows\CurrentVersion\" _
& "Internet Settings\ProxyEnable"
if MsgBox("Disable Proxy server?",vbYesNo) = vbYes then
shell.regwrite key,CLng(0), "REG_DWORD"
else
shell.regwrite key,CLng(1), "REG_DWORD"
end if
--
Michael Harris
Microsoft MVP Scripting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Please ask follow-up questions via the original newsgroup thread.
How do you set the Proxy for every user on a computer?
(I do not wish to use a GPO)
I want to set the Proxy Server = myp...@mycompany.com Port 80
Use same proxy for all protocols.
Ignore proxy for Local stuff
Thanks,
Mike
--
---------------------------------------------------------------------
"Are you still wasting your time with spam?...
There is a solution!"
Protected by GIANT Company's Spam Inspector
The most powerful anti-spam software available.
http://mail.spaminspector.com
"Michael Harris (MVP)" <mikhar at mvps dot org> wrote in message
news:uMugB5B...@tk2msftngp13.phx.gbl...
How to Configure Client Proxy Server Settings by Using a Registry File
http://support.microsoft.com/default.aspx?scid=kb;en-us;819961
From a logon script, you can use WshShell.Run to execute "regsvr32 /s ""path
to\myproxy.reg""" or do the equivalent with WsgShell.RegWrite.
regsvr32 /s ""H:\Files\VBS\proxy.reg""
Here is the Proxy.reg file;
Regedit4
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet
Settings]
"MigrateProxy"=dword:00000001
"ProxyEnable"=dword:00000001
"ProxyHttp1.1"=dword:00000000
"ProxyServer"="http://myproxy.com:80"
"ProxyOverride"="<local>"
> I have tried this and it does nothing.
>
> regsvr32 /s ""H:\Files\VBS\proxy.reg""
Hi,
I would think Michael really meant
regedit.exe /s
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx
duh ;-)...
Mike
Have you checked the registry to see if the changes were imported?
Do you check the exitcode from regedit when you do the WshShell.Run call
(you need to call Run as a function with the bWaitForExit option)?
Are all IE instances closed at the time (direct registry updates do not
affect open IE instances)?