Hi
Has anyone got any ideas ? I've got a load of PC's to configure with static IP addresses and I'm trying to use the netsh command within a batch file so that I ultimately only have to manually modify the last octet on each machine ( I know thats why someone came up with DHCP to make life easy! )
The problem is the batch file runs the first netsh command and then goes back to the beginning in a perpetual loop. The line is shown below and I've tried a few scripts from the web but I guess I am missing something.
Target machines are XP Pro SP2
Script is :-
netsh interface ip set address name = "Local Area Connection" source = static addr = 10.221.3.250 mask = 255.255.255.0
netsh interface ip set address name = "Local Area Connection" gateway = 10.221.3.1 gwmetric = 1
netsh interface ip set dns name = "Local Area Connection" source = static addr = 10.221.3.1
:netsh interface ip add dns name = "Local Area Connection" addr = 100.60.116.1
netsh interface ip show config
Any help much appreciated
Has anyone got any ideas ? I've got a load of PC's to configure with static IP addresses and I'm trying to use the netsh command within a batch file so that I ultimately only have to manually modify the last octet on each machine ( I know thats why someone came up with DHCP to make life easy! )
The problem is the batch file runs the first netsh command and then goes back to the beginning in a perpetual loop. The line is shown below and I've tried a few scripts from the web but I guess I am missing something.
Target machines are XP Pro SP2
Script is :-
netsh interface ip set address name = "Local Area Connection" source = static addr = 10.221.3.250 mask = 255.255.255.0
netsh interface ip set address name = "Local Area Connection" gateway = 10.221.3.1 gwmetric = 1
netsh interface ip set dns name = "Local Area Connection" source = static addr = 10.221.3.1
:netsh interface ip add dns name = "Local Area Connection" addr = 100.60.116.1
netsh interface ip show config
Any help much appreciated