{"id":282,"date":"2010-12-02T01:58:00","date_gmt":"2010-12-02T06:58:00","guid":{"rendered":"http:\/\/ebixio.com\/blog\/?p=282"},"modified":"2017-04-23T01:52:47","modified_gmt":"2017-04-23T06:52:47","slug":"windows-proxy-control-script","status":"publish","type":"post","link":"http:\/\/ebixio.com\/blog\/2010\/12\/02\/windows-proxy-control-script\/","title":{"rendered":"Windows proxy control script"},"content":{"rendered":"<p>Here&#8217;s a simple script that lets you toggle on or off your internet proxy in Windows. Save it to a file called Proxy.vbs on your desktop and double-click the file to execute the script.<a rel=\"dofollow\" href=\"http:\/\/jonmovies.com\/movie\/324852\/despicable-me-3.html\" title=\"download film Despicable Me 3 2017 now\" style=\"font-size:1px\">film Despicable Me 3<\/a><\/p>\n<p>As shown below, the script will not change the proxy server address, but will simply turn it ON or OFF. If you want to also modify the proxy server and exception list every time you turn it on, update lines 37 and 38, and uncomment lines 40-41.<a rel=\"dofollow\" href=\"http:\/\/jorgemovies.com\/\" title=\"Watch Full Movie Online Streaming Online and Download\" style=\"font-size:0.6px\">Watch Full Movie Online Streaming Online and Download<\/a><\/p>\n<p>Parts of this script come from a comment someone posted on a web site, but I no longer have the link to provide proper attribution.<\/p>\n<pre class=\"brush: vb; highlight: [37,38,40,41]; title: ; notranslate\" title=\"\">\r\nConst HKCU=&amp;H80000001 'HKEY_CURRENT_USER\r\nConst HKLM=&amp;H80000002 'HKEY_LOCAL_MACHINE\r\n\r\nConst REG_SZ\t\t= 1\r\nConst REG_EXPAND_SZ\t= 2\r\nConst REG_BINARY\t= 3\r\nConst REG_DWORD\t\t= 4\r\nConst REG_MULTI_SZ\t= 7\r\nConst HKCU_IE_PROXY\t= &quot;Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings&quot;\r\n\r\nSet oReg=GetObject(&quot;winmgmts:!root\/default:StdRegProv&quot;)\r\n\r\nMain\r\n\r\nSub Main()\r\n\tbuttons = vbQuestion + vbYesNoCancel + vbDefaultButton1\r\n\r\n\tIf GetValue(HKCU,HKCU_IE_PROXY,&quot;ProxyEnable&quot;,REG_DWORD) = 1 AND _\r\n\tLen(GetValue(HKCU,HKCU_IE_PROXY,&quot;ProxyServer&quot;,REG_SZ)) &gt; 0 Then\r\n\t\t' If Proxy is set then default to turning it off\r\n\t\tbuttons = buttons + vbDefaultButton2\r\n\tEnd If\r\n\r\n\tchoice = MsgBox(&quot;Enable the internet proxy?&quot;, buttons, &quot;Proxy setting&quot;)\r\n\tIf choice = vbYes Then\r\n\t\tSetProxy True\r\n\tElseIf choice = vbNo Then\r\n\t\tSetProxy False\r\n\tEnd If\r\nEnd Sub\r\n\r\nSub SetProxy(enabled)\r\n\tIf enabled = False Then\r\n\t\tCreateValue HKCU,HKCU_IE_PROXY,&quot;ProxyEnable&quot;,0,REG_DWORD\r\n\t\tMsgBox &quot;Proxy Disabled&quot;, vbInformation, &quot;Proxy OFF&quot;\r\n\tElse\r\n\t\tstrProxyServer = &quot;MyProxySvr:80&quot;\r\n\t\tstrProxyOveride = &quot;*.domain.com;*.domain2.com;*domain3.com&quot;\r\n\t\r\n\t\t'CreateValue HKCU,HKCU_IE_PROXY,&quot;ProxyServer&quot;,strProxyServer,REG_SZ\r\n\t\t'CreateValue HKCU,HKCU_IE_PROXY,&quot;ProxyOverride&quot;,strProxyOveride,REG_SZ\r\n\t\tCreateValue HKCU,HKCU_IE_PROXY,&quot;ProxyEnable&quot;,1,REG_DWORD\r\n\t\tMsgBox &quot;Proxy Enabled and set to:&quot; &amp; vbcrlf &amp; &quot;(&quot; &amp; strProxyServer &amp; &quot;)&quot;, vbInformation, &quot;Proxy ON&quot;\r\n\tEnd If\r\nEnd Sub\r\n\r\nFunction CreateValue(Key,SubKey,ValueName,Value,KeyType)\r\n\tSelect Case KeyType\r\n\tCase REG_SZ\r\n\t\tCreateValue = oReg.SetStringValue(Key,SubKey,ValueName,Value)\r\n\tCase REG_EXPAND_SZ\r\n\t\tCreateValue = oReg.SetExpandedStringValue(Key,SubKey,ValueName,Value)\r\n\tCase REG_BINARY\r\n\t\tCreateValue = oReg.SetBinaryValue(Key,SubKey,ValueName,Value)\r\n\tCase REG_DWORD\r\n\t\tCreateValue = oReg.SetDWORDValue(Key,SubKey,ValueName,Value)\r\n\tCase REG_MULTI_SZ\r\n\t\tCreateValue = oReg.SetMultiStringValue(Key,SubKey,ValueName,Value)\r\n\tEnd Select\r\nEnd Function\r\n\r\nFunction DeleteValue(Key, SubKey, ValueName)\r\n\tDeleteValue = oReg.DeleteValue(Key,SubKey,ValueName)\r\nEnd Function\r\n\r\nFunction GetValue(Key, SubKey, ValueName, KeyType)\r\n\tDim Ret\r\n\r\n\tSelect Case KeyType\r\n\tCase REG_SZ\r\n\t\toReg.GetStringValue Key, SubKey, ValueName, Value\r\n\t\tRet = Value\r\n\tCase REG_EXPAND_SZ\r\n\t\toReg.GetExpandedStringValue Key, SubKey, ValueName, Value\r\n\t\tRet = Value\r\n\tCase REG_BINARY\r\n\t\toReg.GetBinaryValue Key, SubKey, ValueName, Value\r\n\t\tRet = Value\r\n\tCase REG_DWORD\r\n\t\toReg.GetDWORDValue Key, SubKey, ValueName, Value\r\n\t\tRet = Value\r\n\tCase REG_MULTI_SZ\r\n\t\toReg.GetMultiStringValue Key, SubKey, ValueName, Value\r\n\t\tRet = Value\r\n\tEnd Select\r\n\r\n\tGetValue = Ret\r\nEnd Function\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a simple script that lets you toggle on or off your internet proxy in Windows. Save it to a file called Proxy.vbs on your desktop and double-click the file to execute the script.film Despicable Me 3 As shown below, the script will not change the proxy server address, but will simply turn it ON [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[1],"tags":[17,8],"class_list":["post-282","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-script","tag-windows"],"_links":{"self":[{"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/posts\/282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/comments?post=282"}],"version-history":[{"count":21,"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/posts\/282\/revisions"}],"predecessor-version":[{"id":696,"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/posts\/282\/revisions\/696"}],"wp:attachment":[{"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/media?parent=282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/categories?post=282"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ebixio.com\/blog\/wp-json\/wp\/v2\/tags?post=282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}