Scripts Thread, Changing Proxy Settings for home/work use in Coding and Web Development; Hi Guys,
I'm after a script that will run in Windows 7/Vista, that basically changes unticks / ticks the Use ...
11th October 2011, 02:36 PM #1
- Rep Power
Changing Proxy Settings for home/work use
I'm after a script that will run in Windows 7/Vista, that basically changes unticks / ticks the Use a proxy server for your LAN.
This is to enable teachers at my schools to use the internet at home so that they don't keep clearing the proxy settings!
I have managed to create this one for XP, but it doesn't run in Win 7 or Vista..
set oShell = Wscript.CreateObject("Wscript.Shell")
if msgbox("Turn Proxy on?", vbQuestion or vbYesNo) = vbYes then
oShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\In ternet Settings\ProxyEnable", 1, "REG_DWORD"
oShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\In ternet Settings\ProxyServer", "proxy.oldsch:8080", "REG_SZ"
oShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\In ternet Settings\ProxyEnable", 0, "REG_DWORD"
Set oShell = Nothing
Any help is extremely grateful..
11th October 2011, 02:44 PM #2
I export the reg key in ticked and unticked state then a couple of bat files that inport the reg keys as needed and bobs your fathers brother!
11th October 2011, 02:47 PM #3
A pac file would surely be better...if it can't find proxy, then it won't use one
11th October 2011, 02:47 PM #4
Whats wrong with using auto detection aka pac files?
11th October 2011, 02:50 PM #5
Agreed, the best way to go. That way you dont need to mess about with this kind of thing.
Originally Posted by Geoff
11th October 2011, 02:53 PM #6
Definitely - set everything to 'autodetect' and hey presto.
Originally Posted by FN-GM
11th October 2011, 02:55 PM #7
I used to push it out by group policy and leave the autodetect unchecked. If it cant find the .pac file it will not go through a proxy. I found having autodetect made a connect lag for a few seconds when you open up IE.
Originally Posted by CyberNerd
11th October 2011, 03:04 PM #8
Isn't the "Automatically detect settings" checkbox for WPAD and the "Use automatic configuration script" for PACs?
11th October 2011, 03:05 PM #9
same difference - symlink the dat file to the pac file on your webserver
Originally Posted by Arthur
11th October 2011, 03:06 PM #10
What about this ... little app that sits in the system tray. Works on XP and W7 ...
11th October 2011, 03:07 PM #11
Some applications i have found wont work with a PAC file though due to bad coding!
11th October 2011, 03:07 PM #12
Originally Posted by jamesreedersmith
I found macs hate wpad - pac fiels are fine. i posted too soon.
11th October 2011, 08:17 PM #13
I found after adding a wpad file all my pcs disappeared from wsus
2nd November 2011, 02:46 PM #14
- Rep Power
I have now managed to sort this issue out, seems there was a slight error in my VB script... Now it works on Windows 7 / Vista and XP
15th November 2011, 03:42 PM #15
- Rep Power
newdriftking-2008 Can you post the fixed code for others like me that are having the same issue?
By s_tu in forum Windows Server 2008
Last Post: 19th March 2011, 01:25 AM
By painejake in forum Coding
Last Post: 2nd March 2011, 03:49 PM
By sacrej in forum Windows Server 2008 R2
Last Post: 22nd November 2010, 11:23 AM
By speckytecky in forum Windows
Last Post: 21st June 2010, 04:45 PM
By vlan2 in forum Network and Classroom Management
Last Post: 14th September 2009, 12:05 AM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)