Need some help writing a script.....trying to have the script query the computer name and then run a command based on what is the resulting computer name.
For instance, these are the computer names:
If the result is DESKTOP run
route add 192.168.1.0 mask 255.255.255.0 192.168.1.1 IF 37
If the result is LAPTOP run
route add 192.168.1.0 mask 255.255.255.0 192.168.1.1 IF 24
etc with LAPTOP-BACKUP, the IF # will probably be different
This is to help script VPN connections, so there will be different files based on different networks.
I have to delete the route later, but that command is easier
route delete 192.168.1.0
So that is not computer dependent.
The super bestest thing in the entire world would be if the computer name, and IF (interface) number were tied together. The network address and mask should never change. That way if I change computers or IF changes, I make one change opposed to a bunch of files.