IE Proxy Help Requested?

RobDMB

Senior member
Mar 30, 2003
434
0
0
The school I attend requires a proxy to access their wireless network while at school. Normally whenever I go to school I have to go to Internet Options -->Lan Settings and then check the box that says use a proxy server for your lan. Then when I come home at night I have to uncheck the box to use the internet at my house without the proxy. I am wondering if there is anyway that IE can autodetect a proxy server so i don't have to constantly check or uncheck that box to enable or disable the proxy. Any help is appreciated. -Rob
 

spidey07

No Lifer
Aug 4, 2000
65,469
5
76
not really. there is an auto-detect proxy settings but that has to be provided by the DHCP server and it is rarely used.

I'm sure there are programs out there that will do this for you by running them and they make the change. something along the lines of "if I don't hear back from my proxy server then remove it"
 

nweaver

Diamond Member
Jan 21, 2001
6,813
1
0
never checked, but if netsh can enable/disable this, then write a couple of scripts and drop them in quicklaunch or start menu.
 

skyking

Lifer
Nov 21, 2001
22,711
5,839
146
I have some scripts a buddy wrote, I will ask him if they are open source and post:)
 

skyking

Lifer
Nov 21, 2001
22,711
5,839
146
A very big Your Mileage May Vary warning:;



ProxyOff.js


---------------------snip-----------------------------------

// JScript.
Sh = new ActiveXObject("WScript.Shell");
key = "HKEY_CURRENT_USER\\"
Sh.RegWrite( key +

"Software\\Microsoft\\Windows\\CurrentVersion\\Internet

Settings\\ProxyEnable", "0" , "REG_DWORD");
//Sh.RegWrite( key +

"Software\\Microsoft\\Windows\\CurrentVersion\\Internet

Settings\\ProxyServer","", "REG_SZ");
WScript.Echo( Sh.RegRead(key +

Software\\Microsoft\\Windows\\CurrentVersion\\Internet

Settings\\ProxyEnable"));
//WScript.Echo ( Sh.RegRead(key +

"Software\\Microsoft\\Windows\\CurrentVersion\\Internet

Settings\\ProxyServer"));
key = "HKEY_CURRENT_CONFIG\\"
Sh.RegWrite( key +

"Software\\Microsoft\\windows\\CurrentVersion\\Internet

Settings\\ProxyEnable", "0", "REG_DWORD");
WScript.Echo( Sh.RegRead(key +

"Software\\Microsoft\\windows\\CurrentVersion\\Internet

Settings\\ProxyEnable"));


----------------------------------------------snip-------------------------------------------------


ProxyOn.js


---------------------------------------------snip----------------------------------------------------

// JScript.
Sh = new ActiveXObject("WScript.Shell");
key = "HKEY_CURRENT_USER\\"
Sh.RegWrite( key +

"Software\\Microsoft\\Windows\\CurrentVersion\\Internet

Settings\\ProxyEnable", "1" , "REG_DWORD");
//Sh.RegWrite( key +

"Software\\Microsoft\\Windows\\CurrentVersion\\Internet

Settings\\ProxyServer","12.229.56.110:2050",
"REG_SZ");
WScript.Echo( Sh.RegRead(key +

"Software\\Microsoft\\Windows\\CurrentVersion\\Internet

Settings\\ProxyEnable"));
//WScript.Echo ( Sh.RegRead(key +

"Software\\Microsoft\\Windows\\CurrentVersion\\Internet

Settings\\ProxyServer"));
key = "HKEY_CURRENT_CONFIG\\"
Sh.RegWrite( key +

"Software\\Microsoft\\windows\\CurrentVersion\\Internet

Settings\\ProxyEnable", "1", "REG_DWORD");
WScript.Echo( Sh.RegRead(key +

"Software\\Microsoft\\windows\\CurrentVersion\\Internet

Settings\\ProxyEnable"));



-----------------------------------------------------snip---------------------------------------------

work.bat


------------------------------------------------------snip-------------------------------------------

@echo off

ipconfig /release

ipconfig /renew

cscript ProxyOn.js


-----------------------------------------------------snip------------------------------------------



Make those files and put them on your desktop in a
folder or whatever.
They need to be in the same folder.

This has been tested on MS campus with XP Pro,
ymmv:)
 

nweaver

Diamond Member
Jan 21, 2001
6,813
1
0
my gut instict is to puke when I see java doing system scripts.....but I'm not a big java fan, /shrug
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Originally posted by: nweaver
my gut instict is to puke when I see java doing system scripts.....but I'm not a big java fan, /shrug
Fortunately, that's not java ;)
 

kamper

Diamond Member
Mar 18, 2003
5,513
0
0
Sure javascript, but it's not java. A linguistic technicality maybe, but there's a huge difference in the real world (the two share absolutely nothing in common). I would really understand your distate of system scripts written in java :)

But what's so bad about javascript? It's nothing more than a syntax convention and it's not like it's the same stuff that's running in your browser. If you don't like the syntax or the oo model then sure...
 

nweaver

Diamond Member
Jan 21, 2001
6,813
1
0
I'm a perl guy, and a little bit of Bash

I've even dabbled int netsh, but only enough to write perl scripts that dump data to netsh batch files to do stuff MS didn't provide a way for, like loading DHCP reservations from a CSV (or any format other then a backup from another windows server)