Have created two reg files, one to turn on proxy and one to turn proxy off
when remote. Need a batch file that detects whether
the laptop is on or off of the network. When outside the LAN I need the
proxy settings to be off, and on when connected to the LAN.
My code that doesn't work:
C:\Documents and Settings\All Users\Start Menu\Programs\Startup
ProxyServer.bat
If %LOGONSERVER%==\\VGEPDC goto proxyon
:proxyon
echo %LOGONSERVER%
(regedit.exe /s "c:\Temp\proxyon.reg")
goto endif
:else
(regedit.exe /s "c:\Temp\proxyoff.reg")
:endif
batch file runs on startup but seems as though %LOGONSERVER% never changes
to instantiate else statement
Bookmarks