Recommended Posts

I don't know how to create a GUI shortcut to that, but I can tell you where those settings are located in the Registry:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings

If you browse to that using Registry Editor, you will see (or you will have to create) a REG_SZ value named "AutoConfigURL". If that value exists and contains a URL, the setting is activated. If you delete the value or empty it, the setting is disabled. Maybe you can work with that to create a script or a .reg file that enables or disables it with a simple double click. Let me know if you need more help.

  • Like 1
  • Thanks 1

@leonsk29 Many thanks. I found the key. By enabling the toggle button (in Windows 11 Proxy Setting), the key would be created and by toggling it off, the key would be removed automatically 👍🏻.
I want to convert this key to a shortcut. I can export the key and double-click on it to enable the PAC. What do I have to do to remove the key from Registry?

image.png.5257dd821b4e6759368d199506ab1f06.png

 

  • Like 1
  On 25/07/2023 at 19:51, neo2023 said:

@leonsk29 Many thanks. I found the key. By enabling the toggle button (in Windows 11 Proxy Setting), the key would be created and by toggling it off, the key would be removed automatically 👍🏻.
I want to convert this key to a shortcut. I can export the key and double-click on it to enable the PAC. What do I have to do to remove the key from Registry?

image.png.5257dd821b4e6759368d199506ab1f06.png

 

Expand  

I would use the "reg delete" command inside a batch file to double click it and remove the "AutoConfigURL" value when I want the setting to be disabled. That's one of many ways to do it, though.

Something like:

reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL

  On 26/07/2023 at 06:57, neo2023 said:

@Brandon H Thanks. I know nothing about creating batch files with "If"!

Expand  

Here try this :) I use batch scripts all the time at work to help automate work arounds and fixes

@echo off
title Toggle Proxy Auto Config URL

reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL

if %errorlevel% == 0 (goto Delete) else (goto Add)

:Add
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d https://wwww.domain.here
cls
echo Proxy Auto Config URL enabled
pause
exit

:Delete
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL
cls
echo Proxy Auto Config URL removed
pause
exit

Note: save this in to a .bat file and replace the URL on the :Add line with your real URL.

Thanks 🙏🏻. What code do I have to add to disable showing this confirmation dialogue? I want to run the bat file in "Quiet" mode (no CMD window and no confirmation dialogue). Just click on the "bat" file to enable/disable automatically. I have heard, bat files can be run without showing the window (CMD Window). Could it be possible here?

1= Click on the Bat file

2= Click on the Bat file to disable the PAC

3= Extra click to close the window (after confirmation=Yes)

image.png.aecd679bbd38cc0e600468f91781961c.png

Another question: The toggle button (in Windows 11 Proxy Settings) won't change after enabling/disabling with the Reg key. Is this behaviour OK?

image.png.f7555036326e9da284277d7607778b11.png

  On 26/07/2023 at 13:58, neo2023 said:

Thanks 🙏🏻. What code do I have to add to disable showing this confirmation dialogue? I want to run the bat file in "Quiet" mode (no CMD window and no confirmation dialogue). Just click on the "bat" file to enable/disable automatically. I have heard, bat files can be run without showing the window (CMD Window). Could it be possible here?

Expand  

yeah, the end pause was for your confirmation but if you prefer without that then try this instead (also fixed the delete confirmation)

@echo off
title Toggle Proxy Auto Config URL

reg query "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL

if %errorlevel% == 0 (goto Delete) else (goto Add)

:Add
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d https://wwww.domain.here
exit

:Delete
reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /f
exit

 

  On 26/07/2023 at 13:58, neo2023 said:

Another question: The toggle button (in Windows 11 Proxy Settings) won't change after enabling/disabling with the Reg key. Is this behaviour OK?

Expand  

Not sure on this one, could just be it gets out of sync when you change via registry or could be an additional key is needed to toggle on/off.

Brandon H gave you everything you need. Glad I could help. Cheers!

PS: the UI won't change immediately after modifying the Registry, that's normal. You need to close and reopen the GUI to see the change, that forces Settings to re-read the Registry and adjust itself accordingly. You don't need to worry about that. Many Windows UI components are just that: a front-end for the user to easily change Registry settings without having to use Registry Editor.

@leonsk29Thanks 👍🏻. I realized the change (toggle on/off) isn't real-time. I have to close and re-open the Settings. I hope MS add a specific icon for Script proxy to the network icon. An indicator to show PAC use by the network connection (like the latest Win 11 update). I want to get rid of going there to check the on/off status. Unfortunately, I have to turn it on and off many times in an hour!!! I have to browse some URLs directly (with no VPN/Proxy), and some have to be accessed by VPN/Proxy. Frustrating! 
The reason: My rubbish Internet Provider/Carrier censorship policy (in my region).

My dreams ... 😌 ->  image.png.1eb31e994c9b96d47c49cb2cf9c76d26.png 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Damn no doubt this is gonna be good, can't think of many franchises as consistent as RE (apart from 3 remake)
    • There are two version of qbittorrent 5.1.0 The normal version which I think is based of QT5 & the QT6 lt20 version. I'm currently using the QT6 LT20 version of 5.1.0 and it downloaded an ubuntu iso perfectly fine.
    • Are we forgetting the hardware degradation on 13th and 14th gen??
    • Cry more. The Ukrainians who had internet access because of Starlink were trash too, huh?
    • RoboForm 9.7.5 by Razvan Serea RoboForm is the top-rated Password Manager and Web Form Filler that completely automates password entering and form filling. RoboForm makes logging into Web sites and filling forms faster, easier, and more secure. RoboForm memorizes and securely stores each user name and password the first time you log into a site, then automatically supplies them when you return. RoboForm's powerful Logins feature eliminates the manual steps of logging into any online account. With just one click RoboForm will navigate to a Web site, enter your username and password and click the submit button for you. Completing long registration or checkout forms is also a breeze. Simply click on your RoboForm Identity and RoboForm fills-in the entire form for you. You no longer need to remember all your passwords. You remember one Master Password, and RoboForm remembers the rest. This allows you to use stronger passwords, making your online experience more secure. RoboForm uses strong AES encryption for complete data security. The all new RoboForm comes with Chrome and Safari browser support, iPhone/iPad and Android support, as well a brand new RoboForm Everywhere license for use on unlimited computers and mobile devices. RoboForm 9.7.5 changelog: Prepared for the upcoming RoboForm browser extension with New Auth. Download: RoboForm 9.7.5 | 42.1 MB (Free, paid upgrade available) View: RoboForm Website Get alerted to all of our Software updates on Twitter at @NeowinSoftware
  • Recent Achievements

    • One Year In
      Vladimir Migunov earned a badge
      One Year In
    • One Month Later
      daelos earned a badge
      One Month Later
    • Week One Done
      daelos earned a badge
      Week One Done
    • Mentor
      Karlston went up a rank
      Mentor
    • One Month Later
      EdwardFranciscoVilla earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      494
    2. 2
      snowy owl
      252
    3. 3
      +FloatingFatMan
      250
    4. 4
      ATLien_0
      225
    5. 5
      +Edouard
      181
  • Tell a friend

    Love Neowin? Tell a friend!