How can I do this?

Soldato
Joined
25 Nov 2004
Posts
4,788
Location
Hertfordshire
My dad has a laptop from work which he takes around with him. He uses the LAN wired when he's in the office, but uses wireless at home.

However, at work he connects through a proxy server, and at home its straight through.

My question is, is there any way of creating a small program/reg key/bat file or something to change the settings in IE options (LAN settings) so he can stick it on his desktop and just run to change the setting to whatever he wants depending on where he is?

Pic:


At home it needs to be set to "Automatically detect settings" and at work the "Use a Proxy Server for your LAN..."

Any input appreciated! :)
 
Yep.

You'll need to create 2 registry files (work.reg and home.reg i guess).

Then just get it to edit the keys.

Do a quick google for how to create a registry file, and also google for the relavent proxy keys.

YOU NEED TO BE VERY CAREFUL WHEN EDITING THE REGISTRY LIKE THIS THO... SO MAKE A BACKUP FIRST.
 
Yeah...I just realised that it wouldnt work again as a link without registering...

But here's what it says:

For proxy settings:


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



Automatically detect settings ON

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"SavedLegacySettings"=hex: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
"DefaultConnectionSettings"=hex:3c,00,00,00,e9,3c,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,05,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



Automatically Detect Settings OFF


[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



Have to ignore the forum character limit lol


And someone posted a bat file they used to configure their settings, but I don't think I'll do it by bat, I'm more comfortable just creating reg files tbh.


@Echo off
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
 
Back
Top Bottom