WhoIsRich posted a great script to toggle the Automatically detect settings. Can you tell me how to set Use automatic configuration script? Original posted under What key in windows registry disables IE connection parameter "Automatically Detect Settings"?
Asked
Active
Viewed 2.1k times
3
-
so you just want to know how to execute that vbscript file? – rob May 08 '14 at 14:13
-
please provide a bit more context and what do you want to achieve – vlad_tepesch May 08 '14 at 14:32
-
Di you ever get an answer or figure this out ? – Ken Mar 03 '23 at 20:51
3 Answers
4
To set
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "http://www-abc.com:1234/sample.pac" /f
To remove
This is same as unchecking "use automatic configuration script"
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "" /f

Sunil Purushothaman
- 8,435
- 1
- 22
- 20
-
To remove, need to use ‘Reg delete’ to remove the key and for good measure, make a backup before editing the registry. **Backup**: `Reg export "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" C:\temp\InternetSettings.reg` **Remove**: `Reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /f` – Skurfur Jul 13 '15 at 23:14
-
-
to add as a CMD shortcut add the following `C:\Windows\System32\cmd.exe /c reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "" /f` – sidonaldson Jul 08 '20 at 11:18
0
You can save your proxy in setting and use this vbs script to toggle proxy on off..
Option Explicit
Dim WSHShell, strSetting
Set WSHShell = WScript.CreateObject("WScript.Shell")
'Determine current proxy setting and toggle to oppisite setting
strSetting = wshshell.regread("HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable")
If strSetting = 1 Then
NoProxy
Else Proxy
End If
'Subroutine to Toggle Proxy Setting to ON
Sub Proxy
WSHShell.regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable", 1, "REG_DWORD"
wScript.Echo "Proxy is On"
wScript.Sleep 2500
wshShell.SendKeys "{TAB}"
wScript.Sleep 25000
wshShell.SendKeys "{ENTER}"
End Sub
'Subroutine to Toggle Proxy Setting to OFF
Sub NoProxy
WSHShell.regwrite "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable", 0, "REG_DWORD"
wScript.Echo "Proxy is Off"
WScript.Sleep 2500
WshShell.SendKeys "{TAB}"
WScript.Sleep 2500
WshShell.SendKeys "{ENTER}"
End Sub

Dipak Poudel
- 69
- 7
-
Proxy enable/disable is not the same as "Automatically detect settings" or "Use automatic configuration script". They are actually independent of each other. Check the registry directory to see keys like "ProxyEnable" – Yumi Koizumi Nov 23 '20 at 22:40
0
We recently needed to delete an old PAC file entry across many workstations and using a logon script/GPO was not feasible so we used a powershell command to remove the entry across all the users profiles on all the workstations. Ideally you will want to run this in a system user context but can be run as a domain admin.
$localprofiles = gci C:\Users -Name | Sort-Object
foreach($localprofile in $localprofiles){
reg load "hku\$localprofile" "C:\Users\$localprofile\ntuser.dat"
write-host "Loaded $localprofile"
reg delete "hku\$localprofile\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings" /v "AutoConfigURL" /f
reg unload "hku\$localprofile"
write-host "Unloaded $localprofile"
}

Seb
- 179
- 2
- 6