RìggníX Posted March 6, 2007 Share Posted March 6, 2007 hi i'm tryin to change the local ip of the first ethernet adapter. but i want to keep subnet mask, gateway, ... i get the name of the adapter by $cmd = "netsh interface ip show config" $foo = Run($cmd, @SystemDir, @SW_HIDE, $STDOUT_CHILD) $line = "" While 1 $line &= StdoutRead($foo) If @error Then ExitLoop WEnd $adaptorname_start = StringInStr($line, chr(34), 0, 2) + 1 $adaptorname_stop = StringInStr($line, chr(34), 0, 3) $adaptorname = StringMid($line, $adaptorname_start, $adaptorname_stop - $adaptorname_start) now if i run netsh interface ip set address name="LAN" source=static 192.168.0.4 netsh returns a syntax error. any1 got an idea? greetz, RìggníXBiTrAtE.tk Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now