1
Answer

change ip address from batch file

these are commands i am using to change IP Address
 
@echo off
netsh interface ipv4 set address name="Local Area Connection" source=static addr=xxx.xxx.xx.xxx mask=255.255.255.0 gateway=xxx.xxx.xx.x
PAUSE
 
it works for local machine. But i want to change IP address of client machine from server machine, on windows startup.. 
what will be the command for that, any suggestion ?? 
 
Answers (1)
0
habib ullah

habib ullah

NA 116 2k 7y
sir please define the details of the above code
0
Manas Mohapatra

Manas Mohapatra

NA 29.3k 3.3m 7y
You can use Path.GetExtension()
 
string myFilePath = @"C:\Manas.txt";
string ext = Path.GetExtension(myFilePath); //.txt