Link to home
Start Free TrialLog in
Avatar of Cerixus
CerixusFlag for United States of America

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...
Avatar of craylord
craylord

Your right, it doesn't really exist. By setting the other options it will uncheck it. These are the three key settings we change via a login script and it leaves the Auto Detect Settings unchecked.

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]
"ProxyEnable"=dword:00000000
"ProxyServer"="192.168.64.10:8080"
"ProxyOverride"="*.yourlocaldomain.com;<local>"

These registry keys will hide the various internet properties/options tabs. You could hide the Connections tab.

Hide Security Tab
\Software\Policies\Microsoft\Internet Explorer\Control Panel SecurityTab (dword) 0 = visible
1 = hidden

Hide General Tab \Software\Policies\Microsoft\Internet Explorer\Control Panel GeneralTab (dword) 0 = visible
1 = hidden

Hide Connections Tab \Software\Policies\Microsoft\Internet Explorer\Control Panel ConnectionsTab (dword) 0 = visible
1 = hidden

Hide Programs Tab HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel ProgramsTab (dword) 0 = visible
1 = hidden

Hide Advanced Tab HKCU\Software\Policies\Microsoft\Internet Explorer\Control Panel AdvancedTab (dword) 0 = visible
1 = hidden

Hide Content Tab \Software\Policies\Microsoft\Internet Explorer\Control Panel ContentTab (dword) 0 = visible
1 = hidden

ASKER CERTIFIED SOLUTION
Avatar of DVation191
DVation191

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Cerixus

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.
Avatar of Cerixus

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\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v SavedLegacySettings /f
  reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v SavedLegacySettings /t   REG_BINARY /d "3c,00,00,00,95,59,00,00,09,00,00,00,11,00,00,00,32,30,30,2e,35,36,2e,32,32,35,2e,31,33,38,3a,38,30,00,00,00,00,00,00/
,00,00,01,00,00,00,00,00,00,00,f0,8b,c0,e9,d5,5f,c5,01,04,00,00,00,00,01,00,06,c0,a8,28,64,c0,a8,ee,01,c0,a8,40,01,00,00,00,00,00,00,00,00"
 
  pause
 
  rem Add the proxy.pac
  reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /f
  reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "http://proxy" /f
 
  rem delete the proxy settings
  reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /f
  reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
  reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /f
  reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\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.
Avatar of Cerixus

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
when making registry edits from a bath file I use REGEDIT /S <filename.reg> ...it makes things a LOT easier
Avatar of Cerixus

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.reg
so much easier...
however you decide to implement it, i think the answer to this question has been answered anyhow :)
Avatar of Cerixus

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.  :)
Avatar of Cerixus

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".
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.)

Not true, the exported key can then be opened in notepad to get the reg key
Avatar of Cerixus

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.
Avatar of Cerixus

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\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"SavedLegacySettings"=hex:3c,00,00,00,ad,5b,00,00,01,00,00,00,11,00,00,00,32,\
  30,30,2e,35,36,2e,32,32,35,2e,31,33,38,3a,38,30,00,00,00,00,00,00,00,00,01,\
  00,00,00,00,00,00,00,50,52,fd,5d,d6,5f,c5,01,04,00,00,00,00,01,00,06,c0,a8,\
  28,64,c0,a8,ee,01,c0,a8,40,01,00,00,00,00,00,00,00,00
"DefaultConnectionSettings"=hex:3c,00,00,00,ab,3d,00,00,01,00,00,00,11,00,00,\
  00,32,30,30,2e,35,36,2e,32,32,35,2e,31,33,38,3a,38,30,00,00,00,00,00,00,00,\
  00,01,00,00,00,00,00,00,00,50,52,fd,5d,d6,5f,c5,01,04,00,00,00,00,01,00,06,\
  c0,a8,28,64,c0,a8,ee,01,c0,a8,40,01,00,00,00,00,00,00,00,00

maybe that's why it wasn't working :) ... see if it works for you now?
Avatar of Cerixus

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\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v SavedLegacySettings /f
  set SLSKey="3c000000ad5b000001000000110000003230302e35362e3232352e3133383a3830000000000000000001000000000000005052fd5dd65fc5010400000000010006c0a82864c0a8ee01c0a840010000000000000000"
  reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v SavedLegacySettings /t REG_BINARY /d %SLSkey%
  reg delete "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v DefaultConnectionSettings /f
  Set DCSKey="3c000000ab3d000001000000110000003230302e35362e3232352e3133383a3830000000000000000001000000000000005052fd5dd65fc5010400000000010006c0a82864c0a8ee01c0a840010000000000000000"
  reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v DefaultConnectionSettings /t REG_BINARY /d %DCSkey%

  rem Add the proxy.pac
  reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /f
  reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v AutoConfigURL /t REG_SZ /d "http://oursite.net/proxy.pac" /f
 
  rem delete the proxy settings
  reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /f
  reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyEnable /t REG_DWORD /d 0 /f
  reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyServer /f
  reg delete "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v ProxyOverride /f
  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\CurrentVersion\Internet 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\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections" /v SavedLegacySettings /f
REG DELETE "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet 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
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\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"DefaultConnectionSettings"=hex:46,00,00,00,ec,3c,00,00,01,00,00,00,14,00,00,\
  00,69,73,61,2e,70,6f,77,65,6c,6c,73,2e,63,6f,6d,3a,38,30,38,30,07,00,00,00,\
  3c,6c,6f,63,61,6c,3e,00,00,00,00,01,00,00,00,00,00,00,00,50,52,fd,5d,d6,5f,\
  c5,01,04,00,00,00,00,01,00,06,c0,a8,28,64,c0,a8,ee,01,c0,a8,40,01,00,00,00,\
  00,00,00,00,00,00,00,00,00
"SavedLegacySettings"=hex:46,00,00,00,9c,59,00,00,01,00,00,00,14,00,00,00,69,\
  73,61,2e,70,6f,77,65,6c,6c,73,2e,63,6f,6d,3a,38,30,38,30,07,00,00,00,3c,6c,\
  6f,63,61,6c,3e,00,00,00,00,01,00,00,00,00,00,00,00,50,52,fd,5d,d6,5f,c5,01,\
  04,00,00,00,00,01,00,06,c0,a8,28,64,c0,a8,ee,01,c0,a8,40,01,00,00,00,00,00,\
  00,00,00,00,00,00,00

------------------

SET keyvalueoff="460000009c59000001000000140000006973612e706f77656c6c732e636f6d3a38303830070000003c6c6f63616c3e0000000001000000000000005052fd5dd65fc5010400000000010006c0a82864c0a8ee01c0a84001000000000000000000000000"
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
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\CurrentVersion\Internet 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):

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

Open in new window

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="460000009c59000001000000140000006973612e706f77656c6c732e636f6d3a38303830070000003c6c6f63616c3e0000000001000000000000005052fd5dd65fc5010400000000010006c0a82864c0a8ee01c0a84001000000000000000000000000"
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