Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to change the automatic configuration script address in the LAN settings of Internet Explorer 8 with the help of a script?

I use 2 different automatic configuration script addresses in the LAN settings of Internet Explorer 8. During the course of my work, I need to switch between them very often. Every time I have to do it manually.

Is there a way I can automate it through a script or something, so that I can switch between them whenever I want?

like image 708
turbo88 Avatar asked Feb 19 '14 06:02

turbo88


3 Answers

You can use the following commands in a batch file (.bat file) Use of batch files relieves you from making so many UI clicks to perform a simple task of assigning a value to "Use automatic configuration script" text box in the internet options -> Advanced settings.

To use an automatic config script

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "http://www.xxxxx.com:1234/sampleScript" /f

The result looks like:

enter image description here

To clear that field

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "" /f
like image 64
Sunil Purushothaman Avatar answered Nov 09 '22 03:11

Sunil Purushothaman


If you can use PowerShell:

Set the property

Set-ItemProperty -Path 'HKCU:Software\Microsoft\Windows\CurrentVersion\Internet Settings' -Name AutoConfigURL -Value 'http://www.yourdomain.com/config.pac'

Clear the property

Remove-ItemProperty -Path 'HKCU:Software\Microsoft\Windows\CurrentVersion\Internet Settings' -Name AutoConfigURL
like image 34
Djidiouf Avatar answered Nov 09 '22 04:11

Djidiouf


Use below Powershell code to achieve this-

$Users = Get-WmiObject Win32_UserProfile -Filter 'Special=False' | select SID

foreach($User in $Users)
{
$SID = $User.SID
reg add "HKEY_USERS\$SID\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "http://xyz/wpad.dat" /f
REG ADD "HKEY_USERS\$SID\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoDetect /t REG_DWORD /d 0 /f
}
like image 26
harshit dubey Avatar answered Nov 09 '22 04:11

harshit dubey