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

    • Hey Nick! 👋 No worries at all — you're not alone in this, and it's great you're asking for help. Let me walk you through a simple, step-by-step fix using the tool mentioned on that AOMEI Partition Assistant guide — it really does the trick for many people with this exact issue! ✅ Here’s how to restore your USB back to full 256GB on Windows 11: Download & Install AOMEI Partition Assistant Go to the link you shared: AOMEI Partition Assistant and click the Download Freeware button. Insert your USB stick (Sandisk Ultra 256GB) Make sure it's properly connected. Wait for the system to detect it. Launch AOMEI Partition Assistant Once open, you'll see all your connected drives listed. Locate your USB Drive Look for the one that says something like Disk X – Removable and shows only 3.1GB or so. Right-click on your USB Drive’s Partition Then select Delete Partition → confirm the deletion. Now, right-click on the unallocated space (it should now show full unallocated capacity) Choose Create Partition → format it as FAT32 or exFAT (recommended for larger drives) → click OK. Click “Apply” in the top left corner Then hit Proceed to execute the pending operations. Wait a bit... and boom! 🎉 Your USB should now be restored to its full 256GB capacity!
    • When Facebook bought Beat Saber, they promised exactly this would never happen. Facebook can’t not lie.
    • Depends on what you mean by "this data". Nvidia can show you quite a few of those as well in their performance overlay, and I guess they might've assumed that if anyone wants to see more, they'll just use Afterburner as the de facto standard. As for real framerate vs framegen framerate, I don't think they exactly want you to know, given that their marketing has been strongly focused on hiding the real framerate and pretending the generated one is all that matters...
    • Yeah, but that never works out well. You can just give your power user more options and they'll be happy. Your new generation can just go with whatever you think is the best default.
  • Recent Achievements

    • First Post
      Fuzz_c earned a badge
      First Post
    • First Post
      TIGOSS earned a badge
      First Post
    • Week One Done
      slackerzz earned a badge
      Week One Done
    • Week One Done
      vivetool earned a badge
      Week One Done
    • Reacting Well
      pnajbar earned a badge
      Reacting Well
  • Popular Contributors

    1. 1
      +primortal
      710
    2. 2
      ATLien_0
      279
    3. 3
      Michael Scrip
      209
    4. 4
      +FloatingFatMan
      200
    5. 5
      Steven P.
      131
  • Tell a friend

    Love Neowin? Tell a friend!