Jump to content

Recommended Posts

Posted

I have a laptop that is locked down with GPOs and when it is taken off the network and home... any user is not able to use the internet. I am certain this is because proxy is enabled and no user has the permission to change this through the internet options. I was wondering if there is a script out there that will remove the proxy appropriately when it's not on the network.

 

Or even a software that'll run on the taskbar and you can switch between having it off or on.

 

Thanks in advance.

Posted

Thanks for your help guys. I've found a script on here that will do the trick, and it works. :D

 

 

Const HKEY_CURRENT_USER = &H80000001

intmsg = msgbox("CHANGE PROXY SETTINGS" & chr(13) & "ARE YOU AT HOME?",vbYesNo+vbQuestion,"WHERE ARE YOU?")

if intmsg = vbyes then dwvalue = 0 else dwvalue = 1

strComputer = "."
Set objRegistry = GetObject("winmgmts:\\" & strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings"

strValueName = "ProxyEnable"
objRegistry.SetDWORDValue HKEY_CURRENT_USER, strKeyPath, strValueName, dwValue

msgtxt = "THE PROXY SERVER HAS BEEN "
if dwvalue = 0 then msgtxt = msgtxt & "DISABLED"
if dwvalue = 1 then msgtxt = msgtxt & "ENABLED"

intmsg = msgbox(msgtxt,vbOKOnly+vbInfo,"Done")

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...