Hello,
We have 2 offices linked up on a VPN Connection. Each office has its own Domain Server..IP in office 1 and Office 2 have different IP Ranges...i.e. 192.168.0.1 and 192.168.1.1....We also have an additional internet line for faster internet in both offices and hence need to set up manual IP's. I have tested succeffully scripts to set Automatically and Manual IP's...... I am looking for a script to run automatically when starting up the machine to determine which "Office I am in" i.e. Domain Server and then give the respective Manual IP's for that Office.
Something like this"
If Domain name = Office 2
netsh interface ip delete dns "Wireless Network Connection" all
netsh int ip set dns "Wireless Network Connection" static 192.168.0.1 primary
netsh int ip set address "Wireless Network Connection" static 192.168.0.90 255.255.255.0 192.168.0.254 1
netsh interface ip delete dns "Local Area Connection 2" all
netsh interface ip add dns "Local Area Connection 2" 192.168.0.1
netsh interface ip set address "Local Area Connection 2" static 192.168.0.91 255.255.255.0 192.168.0.254 1
ipconfig /release
ipconfig /flushdns
netsh interface ip delete arpcache
ipconfig /renew
else if Domain Name = Office 1
"as above scripts with office 2 ip's"
Regards
Nigel Pastor
Configuration: Windows XP, Windows SBS 2003 and Windows Server 2003

