adbyits
asked on
BATCH FILE TO TO WORK OUT IF I AM ON THE LOCAL NETWORK OR REMOTE
HI all i need to write a batch file for my client to run to map a network drive but first i need to see if he is remote or on the vpn, just wondering how i do this
ASKER
cool thanks BP but i need a batch file to tell me when it is and when uits not and then run a command
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I would suggest you do the following commands on the system when not connected via VPN, and then do then when connected to VPN. Then you need to look for the differences, and something that could be used to identify when a VPN connection is active.
If you want to post up the before and after output we can look at that and guide further.
netsh interface show interface
ipconfig /all
wmic nicconfig get /format:csv
I often prefer the last one, since the output can be parsed fairly easily in a BAT FOR loop, but if the firts one shows a clear difference for VPN that can be simple too.
~bp