mmanning
asked on
Batch file to automatically drop the socks proxy address into the registry.
Could some one write me a file/ tell me how to do it. I need to run the settings from a desktop ikon into IE6.
Many thanks
Marc
Many thanks
Marc
Hi mmanning,
Copy this into a batch file...
@echo off
set regfile=proxy.reg
echo Windows Registry Editor Version 5.00 > %regfile%
echo [HKEY_CURRENT_USER\Softwar e\Microsof t\Windows\ CurrentVer sion\Inter net Settings] >> %regfile%
echo "ProxyEnable"=dword:000000 01 >> %regfile%
echo "ProxyServer"="socks=<addr ess>:<port >" >> %regfile%
echo [HKEY_USERS\.DEFAULT\Softw are\Micros oft\Window s\CurrentV ersion\Int ernet Settings] >> %regfile%
echo "ProxyServer"="socks=<addr ess>:<port >" >> %regfile%
regedit /s %regfile%
set regfile=
...then just run it from the desktop.
It only changes the proxy settings for the current user and default user (ie. new users). I couldn't find a way to change it for all users who've already logged on (ie. system-wide).
Steve :)
Copy this into a batch file...
@echo off
set regfile=proxy.reg
echo Windows Registry Editor Version 5.00 > %regfile%
echo [HKEY_CURRENT_USER\Softwar
echo "ProxyEnable"=dword:000000
echo "ProxyServer"="socks=<addr
echo [HKEY_USERS\.DEFAULT\Softw
echo "ProxyServer"="socks=<addr
regedit /s %regfile%
set regfile=
...then just run it from the desktop.
It only changes the proxy settings for the current user and default user (ie. new users). I couldn't find a way to change it for all users who've already logged on (ie. system-wide).
Steve :)
Sorry, that should have been
.reg:
[HKEY_CURRENT_USER\Softwar e\Microsof t\Windows\ CurrentVer sion\Inter net Settings]
"ProxyServer"="ftp=192.168 .0.10:80;g opher=192. 168.0.10:8 0;http=192 .168.0.10: 80;https=1 92.168.0.1 0:80;socks =192.168.0 .10:80"
"ProxyEnable"=dword:000000 01
.reg:
[HKEY_CURRENT_USER\Softwar
"ProxyServer"="ftp=192.168
"ProxyEnable"=dword:000000
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Many Thanks sda100 Spot on.
.bat:
regedit /s proxies.reg
.reg:
[HKEY_CURRENT_USER\Softwar
ftp=192.168.0.10:80;gopher
"ProxyEnable"=dword:000000
Just provide your proxy's IP and the appropriate ports in the above. The .bat file you can either place on the desktop or create a link to it there.