Discussion:
proxy server
(too old to reply)
peter
2005-05-13 20:22:12 UTC
Permalink
Hi

Every time i put my laptop on at work, it defaults to the proxy server. AD
network.

When i get home and access my wireless lan i have to disable the proxy.

Is there a script to disable it?

Thanks

Peter
Michael Harris (MVP)
2005-05-14 00:46:26 UTC
Permalink
Post by peter
Hi
Every time i put my laptop on at work, it defaults to the proxy
server. AD network.
When i get home and access my wireless lan i have to disable the proxy.
Is there a script to disable it?
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.
Mike
2005-05-17 01:40:28 UTC
Permalink
Hi,

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 = ***@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
Post by Michael Harris (MVP)
Post by peter
Hi
Every time i put my laptop on at work, it defaults to the proxy
server. AD network.
When i get home and access my wireless lan i have to disable the proxy.
Is there a script to disable it?
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.
Michael Harris (MVP)
2005-05-17 03:58:48 UTC
Permalink
Post by Mike
Hi,
How do you set the Proxy for every user on a computer?
(I do not wish to use a GPO)
Use same proxy for all protocols.
Ignore proxy for Local stuff
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.
--
Michael Harris
Microsoft MVP Scripting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Please ask follow-up questions via the original newsgroup thread.
MFelkins
2005-05-17 18:06:08 UTC
Permalink
I have tried this and it does nothing.

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>"
Post by Michael Harris (MVP)
Post by Mike
Hi,
How do you set the Proxy for every user on a computer?
(I do not wish to use a GPO)
Use same proxy for all protocols.
Ignore proxy for Local stuff
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.
--
Michael Harris
Microsoft MVP Scripting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Please ask follow-up questions via the original newsgroup thread.
Torgeir Bakken (MVP)
2005-05-17 19:13:15 UTC
Permalink
Post by MFelkins
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
Michael Harris (MVP)
2005-05-17 23:57:25 UTC
Permalink
Post by Torgeir Bakken (MVP)
I would think Michael really meant
regedit.exe /s
duh ;-)...
--
Michael Harris
Microsoft MVP Scripting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Please ask follow-up questions via the original newsgroup thread.
MFelkins
2005-05-18 16:39:18 UTC
Permalink
Well, either way IE ignores it. What am I missing here?

Mike
Post by Michael Harris (MVP)
Post by Torgeir Bakken (MVP)
I would think Michael really meant
regedit.exe /s
duh ;-)...
--
Michael Harris
Microsoft MVP Scripting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Please ask follow-up questions via the original newsgroup thread.
Michael Harris (MVP)
2005-05-19 00:16:01 UTC
Permalink
Post by MFelkins
Well, either way IE ignores it. What am I missing here?
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)?
--
Michael Harris
Microsoft MVP Scripting
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Please ask follow-up questions via the original newsgroup thread.
c***@gmail.com
2014-08-25 23:08:51 UTC
Permalink
Post by Michael Harris (MVP)
Post by peter
Hi
Every time i put my laptop on at work, it defaults to the proxy
server. AD network.
When i get home and access my wireless lan i have to disable the proxy.
Is there a script to disable it?
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.
Good Afternoon from New Mexico,

Here is a what if situation lets say the Lan settings us a proxy address for the local network and the vpn connection settings under ie use another proxy address, How can i ensure that both proxies are configured in the settings and are maintained. We have noticed that switching on an off the proxy will dump out the setting for the proxy under IE's dial-up and Virtual Private Network settings.

Thanks in advance
Chris

Loading...