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, 01:36 PM #1
- Rep Power
- 0
Changing Proxy Settings for home/work use
Hi Guys,
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.
lan_settings.png
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..
dim oShell
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"
else
oShell.RegWrite "HKCU\Software\Microsoft\Windows\CurrentVersion\In ternet Settings\ProxyEnable", 0, "REG_DWORD"
end if
Set oShell = Nothing
Any help is extremely grateful..
-
-
IDG Tech News
-
11th October 2011, 01: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, 01: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, 01:47 PM #4 Whats wrong with using auto detection aka pac files?
-
-
11th October 2011, 01:50 PM #5 
Originally Posted by
Geoff
Whats wrong with using auto detection aka pac files?

Agreed, the best way to go. That way you dont need to mess about with this kind of thing.
-
-
11th October 2011, 01:53 PM #6 
Originally Posted by
FN-GM
Agreed, the best way to go. That way you dont need to mess about with this kind of thing.
Definitely - set everything to 'autodetect' and hey presto.
-
-
11th October 2011, 01:55 PM #7 
Originally Posted by
CyberNerd
Definitely - set everything to 'autodetect' and hey presto.
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.
-
-
11th October 2011, 02:04 PM #8 Isn't the "Automatically detect settings" checkbox for WPAD and the "Use automatic configuration script" for PACs?
-
-
11th October 2011, 02:05 PM #9 
Originally Posted by
Arthur
Isn't the "Automatically detect settings" checkbox for WPAD and the "Use automatic configuration script" for PACs?

same difference - symlink the dat file to the pac file on your webserver
-
-
11th October 2011, 02:06 PM #10 What about this ... little app that sits in the system tray. Works on XP and W7 ...
http://www.onyxbox.co.uk/software/downloads/ps.htm
-
-
11th October 2011, 02:07 PM #11 Some applications i have found wont work with a PAC file though due to bad coding!
-
-
11th October 2011, 02:07 PM #12 
Originally Posted by
jamesreedersmith
Some applications i have found wont work with a PAC file though due to bad coding!
MACS !!
Edit:
I found macs hate wpad - pac fiels are fine. i posted too soon.
-
-
11th October 2011, 07:17 PM #13 I found after adding a wpad file all my pcs disappeared from wsus
-
-
2nd November 2011, 01:46 PM #14
- Rep Power
- 0
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, 02:42 PM #15
- Rep Power
- 8
newdriftking-2008 Can you post the fixed code for others like me that are having the same issue?
Thanks
-
SHARE: 
Similar Threads
-
By s_tu in forum Windows Server 2008
Replies: 6
Last Post: 19th March 2011, 12:25 AM
-
By painejake in forum Coding
Replies: 22
Last Post: 2nd March 2011, 02:49 PM
-
By sacrej in forum Windows Server 2008 R2
Replies: 0
Last Post: 22nd November 2010, 10:23 AM
-
By speckytecky in forum Windows
Replies: 3
Last Post: 21st June 2010, 03:45 PM
-
By vlan2 in forum Network and Classroom Management
Replies: 2
Last Post: 13th September 2009, 11:05 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules