Re: Proxy settings
From: Grant (gpsnett_at_hotmail.com)
Date: 06/01/04
- Next message: calderara serge: "Setup project in VS.NET"
- Previous message: Grant: "Re: Proxy settings"
- In reply to: Mike SMITH: "Re: Proxy settings"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 1 Jun 2004 20:40:44 +1000
Hey Mike, do you know how to enable the 'proxy bypass' setting in the
registry? The 'Win32_Proxy Class' doesnt have that function and I had a
look in my registry at the
'HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
Settings\ProxyByPass' key but it doesnt change wehen I change me internet
explorer settings - so I think Im looking in the wrong place.
Do you know how to set this from script?
Thanks,
Grant
"Mike SMITH" <mike@nospamtesla76.freeserve.co.uk> wrote in message
news:c9fhl7$6mk$1@newsfeed.th.ifl.net...
> Hi Grant
>
> Here is a couple of functions I used to change the registry, see if
> what
> you need is in there ;-)
>
> <snip>
>
> Function DisableProxy()
>
> Set WshShell = WScript.CreateObject("WScript.Shell")
> MyValue =
> WshShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
> Settings\proxyenable")
>
> If MyValue = 1 Then
>
> WshShell.RegWrite
> "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
> Settings\proxyenable", 0 ,"REG_DWORD"
> WshShell.RegWrite "HKLM\Software\Microsoft\Firewall Client\Disable", 1
> ,"REG_DWORD"
> WshShell.RegWrite
> "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
> Settings\EnableAutoDial", 1 ,"REG_DWORD"
> Wshshell.Regwrite
> "HKEY_CURRENT_CONFIG\Software\Microsoft\windows\CurrentVersion\Internet
> Settings\EnableAutodial", 1 ,"REG_BINARY"
>
> End If
>
>
> Wscript.echo "Proxy Disabled"
>
> End Function
>
>
> Function EnableProxy()
>
> Set WshShell = WScript.CreateObject("WScript.Shell")
> MyValue =
> WshShell.RegRead("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
> Settings\proxyenable")
>
> If MyValue = 0 Then
>
> WshShell.RegWrite
> "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
> Settings\ProxyEnable", 1 ,"REG_DWORD"
> WshShell.RegWrite
> "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
> Settings\ProxyServer","myproxy server:<port no>"
> WshShell.RegWrite "HKLM\Software\Microsoft\Firewall Client\Disable", 0
> ,"REG_DWORD"
> WshShell.RegWrite
> "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
> Settings\EnableAutoDial", 0 ,"REG_DWORD"
> Wshshell.Regwrite
> "HKEY_CURRENT_CONFIG\Software\Microsoft\windows\CurrentVersion\Internet
> Settings\EnableAutodial", 0 ,"REG_BINARY"
>
> End If
>
> Wscript.echo "Proxy Enabled"
>
> End Function
>
> </snip>
>
> It's from a script I wrote for my laptop when I was at work or from home.
> MyValue comes from the result of pinging the proxy.
>
> HTH
>
> Mike
>
> "Grant" <gpsnett@hotmail.com> wrote in message
> news:O$GVhYsREHA.3504@TK2MSFTNGP09.phx.gbl...
>> Hello,
>>
>> Is there a way to set the proxy server of a machine at login? I found the
>> 'SetProxySetting' in the 'Win32_Proxy Class' on the MSDN site but I dont
>> know how to implement it.
>>
>>
>> Thanks,
>> Grant
>>
>>
>
>
- Next message: calderara serge: "Setup project in VS.NET"
- Previous message: Grant: "Re: Proxy settings"
- In reply to: Mike SMITH: "Re: Proxy settings"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|