Cerixus
asked on
Registry key for IE's "Auto Detect Settings" option.
I have a batch file that automatically changes all the LAN settings for IE to point to our corporate proxy. The only problem is, I can't find a key for the "Automatically Detect Settings" option, so if anyone inadvertantly checks it, my batch file won't uncheck it. Anyone know where to find this? I've used RegShot to compare, but I just don't think it's there...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I'm apparently having trouble adding hex values via a batch file using Reg Add. I know you technically answered my question, but since I mentioned
that I'm using a batch file, I don't think it's out of line to ask for someone to post the reg add command to add the above two keys. I'll distribute the
points if someone other than DVation191 posts the solution.
that I'm using a batch file, I don't think it's out of line to ask for someone to post the reg add command to add the above two keys. I'll distribute the
points if someone other than DVation191 posts the solution.
ASKER
and FYI, here is my current batch file:
rem @echo off
rem -------------------------- -{ Written by Scott Beeson, 2004 }------------------------- --
echo Configuring proxy settings...
ping 1.1.1.1 -n 1 -w 1000 > nul
rem uncheck "Automatically detect settings"
reg delete "HKEY_CURRENT_USER\Softwar e\Microsof t\Windows\ CurrentVer sion\Inter net Settings\Connections" /v SavedLegacySettings /f
reg add "HKEY_CURRENT_USER\Softwar e\Microsof t\Windows\ CurrentVer sion\Inter net Settings\Connections" /v SavedLegacySettings /t REG_BINARY /d "3c,00,00,00,95,59,00,00,0 9,00,00,00 ,11,00,00, 00,32,30,3 0,2e,35,36 ,2e,32,32, 35,2e,31,3 3,38,3a,38 ,30,00,00, 00,00,00,0 0/
,00,00,01,00,00,00,00,00,0 0,00,f0,8b ,c0,e9,d5, 5f,c5,01,0 4,00,00,00 ,00,01,00, 06,c0,a8,2 8,64,c0,a8 ,ee,01,c0, a8,40,01,0 0,00,00,00 ,00,00,00, 00"
pause
rem Add the proxy.pac
reg delete "HKCU\Software\Microsoft\W indows\Cur rentVersio n\Internet Settings" /v AutoConfigURL /f
reg add "HKCU\Software\Microsoft\W indows\Cur rentVersio n\Internet Settings" /v AutoConfigURL /t REG_SZ /d "http://proxy" /f
rem delete the proxy settings
reg delete "HKCU\Software\Microsoft\W indows\Cur rentVersio n\Internet Settings" /v ProxyEnable /f
reg add "HKCU\Software\Microsoft\W indows\Cur rentVersio n\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
reg delete "HKCU\Software\Microsoft\W indows\Cur rentVersio n\Internet Settings" /v ProxyServer /f
reg delete "HKCU\Software\Microsoft\W indows\Cur rentVersio n\Internet Settings" /v ProxyOverride /f
echo Installation complete.
ping 1.1.1.1 -n 1 -w 1000 > nul
All the other keys work. The ping is for a delay.
rem @echo off
rem --------------------------
echo Configuring proxy settings...
ping 1.1.1.1 -n 1 -w 1000 > nul
rem uncheck "Automatically detect settings"
reg delete "HKEY_CURRENT_USER\Softwar
reg add "HKEY_CURRENT_USER\Softwar
,00,00,01,00,00,00,00,00,0
pause
rem Add the proxy.pac
reg delete "HKCU\Software\Microsoft\W
reg add "HKCU\Software\Microsoft\W
rem delete the proxy settings
reg delete "HKCU\Software\Microsoft\W
reg add "HKCU\Software\Microsoft\W
reg delete "HKCU\Software\Microsoft\W
reg delete "HKCU\Software\Microsoft\W
echo Installation complete.
ping 1.1.1.1 -n 1 -w 1000 > nul
All the other keys work. The ping is for a delay.
ASKER
Crap, meant to edit out the company proxy... too bad there's no edit feature :(
Guess I was mistaken. However what is with all this detailed reg add/delete scripting? Simplify it by importing a file.
1. Configure a pc the way you want.
2. Export the registry subkey
3. Open the key in notepad remove the unneeded blather and reg info.
4. Put this reg in a share. Same share as the batch file?
5. add this line to your batch file to just import a reg file. Check for arguements.
reg import internetsettingswithproxy. reg
Done
1. Configure a pc the way you want.
2. Export the registry subkey
3. Open the key in notepad remove the unneeded blather and reg info.
4. Put this reg in a share. Same share as the batch file?
5. add this line to your batch file to just import a reg file. Check for arguements.
reg import internetsettingswithproxy.
Done
when making registry edits from a bath file I use REGEDIT /S <filename.reg> ...it makes things a LOT easier
ASKER
When working with files, unlike heads, 1 is better than 2.
Is this part of a logon script? Then simply set the autodetect off, export the key i specified above and put the reg file on a share. in your script instead of using REG commands use REGEDIT /S \\SERVER\SHARE\filename.re g
so much easier...
however you decide to implement it, i think the answer to this question has been answered anyhow :)
so much easier...
however you decide to implement it, i think the answer to this question has been answered anyhow :)
ASKER
First of all, I understand HOW to use a .reg file. Secondly, it doesn't matter WHY I don't want to.
However, you are correct that technically the question has been answered. I will create a new question to try and find out how to add the key without using a .reg file.
p.s. I don't really need a better reason than the fact that I should be able to do it using only a batch file. :)
However, you are correct that technically the question has been answered. I will create a new question to try and find out how to add the key without using a .reg file.
p.s. I don't really need a better reason than the fact that I should be able to do it using only a batch file. :)
ASKER
Funny... I actually tried using the values you posted and putting them in a .reg file and neither of them unchecked "automatically detect settings".
And it did say "Informaiton successfully imported into the registry".
And it did say "Informaiton successfully imported into the registry".
Try physically making the change and exporting the key. Then use the values from the exported key.
>DVation191
>Try physically making the change and exporting the key. Then use the values from the exported key.
Cerixus already stated he doesn't want to use .reg files. Using this exported reg file would defeat the purpose of doing it in a bat file. :) (tongue in cheek, couldn't resist.)
>Try physically making the change and exporting the key. Then use the values from the exported key.
Cerixus already stated he doesn't want to use .reg files. Using this exported reg file would defeat the purpose of doing it in a bat file. :) (tongue in cheek, couldn't resist.)
Not true, the exported key can then be opened in notepad to get the reg key
ASKER
If it didn't work with the one you posted, that indicates to me that the key is different for every computer, which also renders it useless. Or am I misunderstanding why I would need to export it myself?
I checked it on another machine and you are correct...it appears to be different, whether it's different on every machine or specific versions of IE or your OS I'm not sure...my appologies.
ASKER
Somewhere Bill Gates is sitting in a cushy office chair laughing out loud, "Ha ha ha! The fool wants to disable automatically detect settings!!!"
Works for my pc's, no problem with the 300+ stations/users.
I don't know if it even matters at this point, but I noticed I made a mistake in my original post. Those two keys I posted are BOTH the same (at least from what I can see)...and they are BOTH for turning the feature ON.
The reg key for turning it off is this...
[HKEY_CURRENT_USER\Softwar e\Microsof t\Windows\ CurrentVer sion\Inter net Settings\Connections]
"SavedLegacySettings"=hex: 3c,00,00,0 0,ad,5b,00 ,00,01,00, 00,00,11,0 0,00,00,32 ,\
30,30,2e,35,36,2e,32,32,35 ,2e,31,33, 38,3a,38,3 0,00,00,00 ,00,00,00, 00,00,01,\
00,00,00,00,00,00,00,50,52 ,fd,5d,d6, 5f,c5,01,0 4,00,00,00 ,00,01,00, 06,c0,a8,\
28,64,c0,a8,ee,01,c0,a8,40 ,01,00,00, 00,00,00,0 0,00,00
"DefaultConnectionSettings "=hex:3c,0 0,00,00,ab ,3d,00,00, 01,00,00,0 0,11,00,00 ,\
00,32,30,30,2e,35,36,2e,32 ,32,35,2e, 31,33,38,3 a,38,30,00 ,00,00,00, 00,00,00,\
00,01,00,00,00,00,00,00,00 ,50,52,fd, 5d,d6,5f,c 5,01,04,00 ,00,00,00, 01,00,06,\
c0,a8,28,64,c0,a8,ee,01,c0 ,a8,40,01, 00,00,00,0 0,00,00,00 ,00
maybe that's why it wasn't working :) ... see if it works for you now?
The reg key for turning it off is this...
[HKEY_CURRENT_USER\Softwar
"SavedLegacySettings"=hex:
30,30,2e,35,36,2e,32,32,35
00,00,00,00,00,00,00,50,52
28,64,c0,a8,ee,01,c0,a8,40
"DefaultConnectionSettings
00,32,30,30,2e,35,36,2e,32
00,01,00,00,00,00,00,00,00
c0,a8,28,64,c0,a8,ee,01,c0
maybe that's why it wasn't working :) ... see if it works for you now?
ASKER
lol, it works now.
@echo off
rem -------------------------- -{ Written by Scott Beeson, 2004 }------------------------- --
echo Configuring proxy settings...
ping 1.1.1.1 -n 1 -w 1000 > nul
rem uncheck "Automatically detect settings"
reg delete "HKEY_CURRENT_USER\Softwar e\Microsof t\Windows\ CurrentVer sion\Inter net Settings\Connections" /v SavedLegacySettings /f
set SLSKey="3c000000ad5b000001 0000001100 0000323030 2e35362e32 32352e3133 383a383000 0000000000 0000010000 0000000000 5052fd5dd6 5fc5010400 0000000100 06c0a82864 c0a8ee01c0 a840010000 0000000000 00"
reg add "HKEY_CURRENT_USER\Softwar e\Microsof t\Windows\ CurrentVer sion\Inter net Settings\Connections" /v SavedLegacySettings /t REG_BINARY /d %SLSkey%
reg delete "HKEY_CURRENT_USER\Softwar e\Microsof t\Windows\ CurrentVer sion\Inter net Settings\Connections" /v DefaultConnectionSettings /f
Set DCSKey="3c000000ab3d000001 0000001100 0000323030 2e35362e32 32352e3133 383a383000 0000000000 0000010000 0000000000 5052fd5dd6 5fc5010400 0000000100 06c0a82864 c0a8ee01c0 a840010000 0000000000 00"
reg add "HKEY_CURRENT_USER\Softwar e\Microsof t\Windows\ CurrentVer sion\Inter net Settings\Connections" /v DefaultConnectionSettings /t REG_BINARY /d %DCSkey%
rem Add the proxy.pac
reg delete "HKCU\Software\Microsoft\W indows\Cur rentVersio n\Internet Settings" /v AutoConfigURL /f
reg add "HKCU\Software\Microsoft\W indows\Cur rentVersio n\Internet Settings" /v AutoConfigURL /t REG_SZ /d "http://oursite.net/proxy.pac" /f
rem delete the proxy settings
reg delete "HKCU\Software\Microsoft\W indows\Cur rentVersio n\Internet Settings" /v ProxyEnable /f
reg add "HKCU\Software\Microsoft\W indows\Cur rentVersio n\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
reg delete "HKCU\Software\Microsoft\W indows\Cur rentVersio n\Internet Settings" /v ProxyServer /f
reg delete "HKCU\Software\Microsoft\W indows\Cur rentVersio n\Internet Settings" /v ProxyOverride /f
echo Configuration complete.
ping 1.1.1.1 -n 1 -w 1000 > nul
@echo off
rem --------------------------
echo Configuring proxy settings...
ping 1.1.1.1 -n 1 -w 1000 > nul
rem uncheck "Automatically detect settings"
reg delete "HKEY_CURRENT_USER\Softwar
set SLSKey="3c000000ad5b000001
reg add "HKEY_CURRENT_USER\Softwar
reg delete "HKEY_CURRENT_USER\Softwar
Set DCSKey="3c000000ab3d000001
reg add "HKEY_CURRENT_USER\Softwar
rem Add the proxy.pac
reg delete "HKCU\Software\Microsoft\W
reg add "HKCU\Software\Microsoft\W
rem delete the proxy settings
reg delete "HKCU\Software\Microsoft\W
reg add "HKCU\Software\Microsoft\W
reg delete "HKCU\Software\Microsoft\W
reg delete "HKCU\Software\Microsoft\W
echo Configuration complete.
ping 1.1.1.1 -n 1 -w 1000 > nul
so sorry about that lol
Just in case anyone else finds this post - this information helped me:
If you delete the following values:
SavedLegacySettings
DefaultConnectionSettings
from the key:
HKEY_CURRENT_USER\Software \Microsoft \Windows\C urrentVers ion\Intern et Settings\Connections
IE will re-create the default ones startup which is to autodetect proxy settings.
reg can be used in a login script:
REG DELETE "HKEY_CURRENT_USER\Softwar e\Microsof t\Windows\ CurrentVer sion\Inter net Settings\Connections" /v SavedLegacySettings /f
REG DELETE "HKEY_CURRENT_USER\Softwar e\Microsof t\Windows\ CurrentVer sion\Inter net Settings\Connections" /v DefaultConnectionSettings /f
You can then set up proxy autoconfiguration using DHCP and/or DNS.
Ref:
Troubleshooting Automatic Detection: http://www.microsoft.com/technet/isa/2004/ts_wpad.mspx
Setting up a proxy autodetect environment therefore no need for anything but a default IE configuration: http://www.microsoft.com/technet/isa/2004/plan/automaticdiscovery.mspx
and for an overview to creating your own wpad.dat or proxy.pac therefore not having to depend on IAS: http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html
If you delete the following values:
SavedLegacySettings
DefaultConnectionSettings
from the key:
HKEY_CURRENT_USER\Software
IE will re-create the default ones startup which is to autodetect proxy settings.
reg can be used in a login script:
REG DELETE "HKEY_CURRENT_USER\Softwar
REG DELETE "HKEY_CURRENT_USER\Softwar
You can then set up proxy autoconfiguration using DHCP and/or DNS.
Ref:
Troubleshooting Automatic Detection: http://www.microsoft.com/technet/isa/2004/ts_wpad.mspx
Setting up a proxy autodetect environment therefore no need for anything but a default IE configuration: http://www.microsoft.com/technet/isa/2004/plan/automaticdiscovery.mspx
and for an overview to creating your own wpad.dat or proxy.pac therefore not having to depend on IAS: http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html
How to auto turning the "Automatically Detect Settings" ON?
I came across this post while looking for a way to disable proxy detection in policy. While it helped me get the answer, it was not entirely accurate. The hex strings in DVation191's "turn off" and "turn on" reg files are the exact same string. I was able to monitor the change in this string as I turned the setting on and off on my computer.
These are my results for the hex strings to turn off proxy detection, both in reg and bat form.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Softwar e\Microsof t\Windows\ CurrentVer sion\Inter net Settings\Connections]
"DefaultConnectionSettings "=hex:46,0 0,00,00,ec ,3c,00,00, 01,00,00,0 0,14,00,00 ,\
00,69,73,61,2e,70,6f,77,65 ,6c,6c,73, 2e,63,6f,6 d,3a,38,30 ,38,30,07, 00,00,00,\
3c,6c,6f,63,61,6c,3e,00,00 ,00,00,01, 00,00,00,0 0,00,00,00 ,50,52,fd, 5d,d6,5f,\
c5,01,04,00,00,00,00,01,00 ,06,c0,a8, 28,64,c0,a 8,ee,01,c0 ,a8,40,01, 00,00,00,\
00,00,00,00,00,00,00,00,00
"SavedLegacySettings"=hex: 46,00,00,0 0,9c,59,00 ,00,01,00, 00,00,14,0 0,00,00,69 ,\
73,61,2e,70,6f,77,65,6c,6c ,73,2e,63, 6f,6d,3a,3 8,30,38,30 ,07,00,00, 00,3c,6c,\
6f,63,61,6c,3e,00,00,00,00 ,01,00,00, 00,00,00,0 0,00,50,52 ,fd,5d,d6, 5f,c5,01,\
04,00,00,00,00,01,00,06,c0 ,a8,28,64, c0,a8,ee,0 1,c0,a8,40 ,01,00,00, 00,00,00,\
00,00,00,00,00,00,00
------------------
SET keyvalueoff="460000009c590 0000100000 0140000006 973612e706 f77656c6c7 32e636f6d3 a383038300 70000003c6 c6f63616c3 e000000000 1000000000 000005052f d5dd65fc50 1040000000 0010006c0a 82864c0a8e e01c0a8400 1000000000 0000000000 00000"
reg add "HKEY_CURRENT_USER\Softwar e\Microsof t\Windows\ CurrentVer sion\Inter net Settings\Connections" /v SavedLegacySettings /t REG_BINARY /d %keyvalueoff% /f
reg add "HKEY_CURRENT_USER\Softwar e\Microsof t\Windows\ CurrentVer sion\Inter net Settings\Connections" /v DefaultConnectionSettings /t REG_BINARY /d %keyvalueoff% /f
These are my results for the hex strings to turn off proxy detection, both in reg and bat form.
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Softwar
"DefaultConnectionSettings
00,69,73,61,2e,70,6f,77,65
3c,6c,6f,63,61,6c,3e,00,00
c5,01,04,00,00,00,00,01,00
00,00,00,00,00,00,00,00,00
"SavedLegacySettings"=hex:
73,61,2e,70,6f,77,65,6c,6c
6f,63,61,6c,3e,00,00,00,00
04,00,00,00,00,01,00,06,c0
00,00,00,00,00,00,00
------------------
SET keyvalueoff="460000009c590
reg add "HKEY_CURRENT_USER\Softwar
reg add "HKEY_CURRENT_USER\Softwar
For clarification, powellsadmin's settings WILL shut the Automatically Detect Settings off but it will also put his former settings in your computer.
For example, using powellsadmin's reg or bat file above will put "isa.powells.com:8080" and enable the "bypass local" setting into your browser's proxy server "history".
A better way to do this would be to actually delete the HKEY_CURRENT_USER\Software \Microsoft \Windows\C urrentVers ion\Intern et Settings\Connections\ key's "DefaultConnectionSettings " and "SavedLegacySettings" values, manually disable Automatically Detect Settings and then export the file. You'd end up with a much cleaner registry keys like the ones used in the REG file and Batch file below (modified from powellsadmin's files):
For example, using powellsadmin's reg or bat file above will put "isa.powells.com:8080" and enable the "bypass local" setting into your browser's proxy server "history".
A better way to do this would be to actually delete the HKEY_CURRENT_USER\Software
Windows Registry Editor Version 5.00
// REG file to import with REGEDIT
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"DefaultConnectionSettings"=hex:46,00,00,00,01,00,00,00,01,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00
"SavedLegacySettings"=hex:46,00,00,00,02,00,00,00,01,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,00,\
00,00,00,00,00,00,00,00,00,00,00,00,00,00
SET keyvalueoff="4600000001000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v SavedLegacySettings /t REG_BINARY /d %keyvalueoff% /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v DefaultConnectionSettings /t REG_BINARY /d %keyvalueoff% /f
// End of REG File
::Begin Batch file using REG.EXE
SET keyvalueoff="4600000001000000010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v SavedLegacySettings /t REG_BINARY /d %keyvalueoff% /f
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v DefaultConnectionSettings /t REG_BINARY /d %keyvalueoff% /f
::End of Batch File
There is a prob. using HEX and long strings in a commandline etc. so therefore this solution here is "one" of the better :-)
SET keyvalueoff="460000009c590 0000100000 0140000006 973612e706 f77656c6c7 32e636f6d3 a383038300 70000003c6 c6f63616c3 e000000000 1000000000 000005052f d5dd65fc50 1040000000 0010006c0a 82864c0a8e e01c0a8400 1000000000 0000000000 00000"
reg add "HKEY_CURRENT_USER\Softwar e\Microsof t\Windows\ CurrentVer sion\Inter net Settings\Connections" /v SavedLegacySettings /t REG_BINARY /d %keyvalueoff% /f
reg add "HKEY_CURRENT_USER\Softwar e\Microsof t\Windows\ CurrentVer sion\Inter net Settings\Connections" /v DefaultConnectionSettings /t REG_BINARY /d %keyvalueoff% /f
SET keyvalueoff="460000009c590
reg add "HKEY_CURRENT_USER\Softwar
reg add "HKEY_CURRENT_USER\Softwar
[HKEY_CURRENT_USER\Softwar
"ProxyEnable"=dword:000000
"ProxyServer"="192.168.64.
"ProxyOverride"="*.yourloc
These registry keys will hide the various internet properties/options tabs. You could hide the Connections tab.
Hide Security Tab
\Software\Policies\Microso
1 = hidden
Hide General Tab \Software\Policies\Microso
1 = hidden
Hide Connections Tab \Software\Policies\Microso
1 = hidden
Hide Programs Tab HKCU\Software\Policies\Mic
1 = hidden
Hide Advanced Tab HKCU\Software\Policies\Mic
1 = hidden
Hide Content Tab \Software\Policies\Microso
1 = hidden