Jump to content
Sign in to follow this  

IP Address and Gateway change

Recommended Posts


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 1","",@SW_HIDE)

IP Address =

mask =

Gateway =

This example is from the help within netsh

Can anyone suggest what I am doing wrong


Share this post

Link to post
Share on other sites

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. :D

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.txt

After, run the output file:

netsh exec $yourFile

Hope it helps. :huh2:

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...