Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: Script To Turn Off Proxy Settings

27 May 2014   #1

Win 7 Home Premium x64
Script To Turn Off Proxy Settings

I have a problem PC that I've scrubbed clean with everything from Combofix to Ccleaner to Malwarebytes anti-rootkit, to JRT, to ADW, to TDSS, to rkill and beyond.

The only thing wrong with this PC is that, every few days the proxy settings are toggled on and I need to go turn them off.

I can find no trace of any malicious software on this machine at all, so while I do more research I want to write a script that will run every 10 minutes or so turning off Internet proxy settings.

Would any adventurous soul be willing to lend a hand in this one? :)

My System SpecsSystem Spec
28 May 2014   #2

Linux Mint 17 Cinnamon | Win 7 Ult x64


Try this..

reg add "[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
" /v ProxyEnable /t REG_DWORD /d "0" /f
I have no idea if it works for FF or Chrome, but it does seem to work for IE, which is the only one I tried it on.

All you need to do it add that line to a .BAT/.CMD file, and set up a windows task to run when you want it.

A tutorial for that can be found here... Task Scheduler - Create New Task

But I don't deserve credit for this... I simply Googled your request and got thousands of hits...
My System SpecsSystem Spec
28 May 2014   #3

W7 Pro SP1 64bit

Comicsnut, TanyaC was kind enough to dig up some code for you, but the code should be all on one line. The line return probably came in via copy/paste from a website.
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d "0" /f
Also, there should not be brackets around the key name. The code quoted above has been tested using a Virtual Machine; however, it only turns off one of the ways to set a proxy. The code above will "uncheck" the Proxy server option, but not the "...script" option.

Script To Turn Off Proxy Settings-proxy.png

Is this on a customer's computer or on a computer that you own?

Take a look at the first video in this post where I have an AutoIt script constantly monitoring a few registry keys. When I use regedit to simulate some app making an unwanted change, the script halts with a message telling the user the time that the change happened.

If I change that script to watch for a change to the proxy settings in the registry, we can know exactly when the change happened. Add Process Monitor into the mix and we might know what app changed the setting. See this post for more info. That said, some apps just call WMI to make registry changes. Process Monitor might only show WMI and not the app that called it.

Running Process Monitor for weeks at a time might be problematic, but there are ways to set it up so that it should work. Just let me know if you want to bother with it.

My System SpecsSystem Spec


 Script To Turn Off Proxy Settings

Thread Tools

Similar help and support threads
Thread Forum
Proxy settings keep turning on.
I use google chrome, and multiple times a day my proxy settings toggles back on and won't allow me on the internet until I turn them off. I don't use proxy, nor do I plan on using it. I'm just tired of having to turn it off when I get back on it after turning my laptop off, or closing it. It even...
Network & Sharing
Internet doesnt saves proxy settings
hi i have windows 7 enterprise latest updated and internet explorer 10 (cant move to 11 due to compatagbility issues) . internet explorer doesn't refinements the proxy settings. we have set it to auto detect and it automatically gets unticked. it is a domain environment and we are only...
Network & Sharing
Proxy Settings By Machine?
I'm trying to configure a Windows 7 computer to set the default proxy settings by machine and not by user. I've managed to find the policy in "ProxySettingsPerUser" and when I set that to 0 it gives me the effect I want and doesn't force me to edit the settings for each user. Similar to the...
Network & Sharing
Proxy Bypass on Internet settings
What is the purpose of a sofware program trying to change the Proxy Bypass on Internet settings? Is it malicious?
Network & Sharing
Proxy Settings...effects instant messaging to keep get disconnected
Hi all, Does blocking certain website using proxy setting will effect messaging software like yahoo messenger,msn,skye,google talk to disconnect frequently? I am facing this issue..instant messaging keeps get disconnected always? FYI,my MSN and Yahoo Messenger always gets disconnected.
Network & Sharing

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 14:33.
Twitter Facebook Google+