TimBS Posted June 28, 2004 Posted June 28, 2004 Hi, I'm still trying to change IP Addresses. I've got most of it working, but fail when I attempt to change the gateway. I can do the change when I do the job manually, but not within my script. My Code for Win 2000 is: RunWait(@comspec & " /c netsh interface IP set address local static 10.00.0.9 255.0.0.0 10.0.0.1 1","",@SW_HIDE) IP Address = 10.00.0.9 mask = 255.0.0.0 Gateway = 10.00.0.1 This example is from the help within netsh Can anyone suggest what I am doing wrong Thanks
Josbe Posted June 29, 2004 Posted June 29, 2004 Time ago, I had the same problem.I don't sure why Run(...) function don't set the values, like when is changed manually in the prompt. But, I solved running a script with exec, first generate (FileWriteLine) a dump file, with your values(IPs), like this output:netsh -c interface dump > C:\example.txtAfter, run the output file:netsh exec $yourFileHope it helps. AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta
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