Jump to content
Sign in to follow this  

Can Autoit Used To Change Ip Address Remotely?

Recommended Posts

Can someone give me reference of the AutoIT ability to change IP Configuration remotely. I mean i need to change client configuration from DHCP to Static IP without interfere the user. Probably AutoIT can solve my problem :)

No one can gave me a clue? :(

Edited by Elkie

Share this post

Link to post
Share on other sites

I don't know your OS. With XP Pro it should work

with netsh and pstools. But I didn't test it...

PSTools: info and download


To save the current network settings, open a dos-shell

and type in: netsh -c interface dump > settings.txt

Now there is a file you can open with notepad and

edit the settings /it should be saved under

C:\Documents and Settings\{Username}\Settings.txt

Here you have to fill in the desired settings for your

remote pc. The file is well documented and will help

you. When you have finished editing save the file.

With psexec.exe you are able to execute commands

remote on other pcs. For further information look

into the help file.

I would do so or something like that:

Create a script and compile it (name changesettings.exe)

$sNewConfig = 'Paste here the complete settings.txt'

$oFile = FileOpen("C:\Settings.txt", 1)

If $oFile = -1 Then Exit
FileWrite($oFile, $sNewConfig)

RunWait(@Comspec & " /c netsh -f C:\Settings.txt")

The the following commandline:

psexec \\IP -u USER -p PASSWORD -c changesettings.exe

I cannot test it, so you will have to try.

Regards, Buffo

Share this post

Link to post
Share on other sites

If PSExec doesn't work, you can also add it to the loginscript, using a register variable you can prevent double execution of the script.

Share this post

Link to post
Share on other sites

AutoIt can write to the registry of a remote computer:


You can change from DHCP to Static at the key for the active NIC:


(You know the current/active IP to double check the key.)

Then you need to make the NIC reread the info:

use psexec and this script to disable/re-enable the NIC:


(Although I think that a restart would give you less trouble, but I do not know if that meets your criteria of "without interfere the user".)


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