Elkie Posted May 10, 2006 Share Posted May 10, 2006 (edited) 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 May 10, 2006 by Elkie Link to comment Share on other sites More sharing options...
Buffo Posted May 10, 2006 Share Posted May 10, 2006 I don't know your OS. With XP Pro it should workwith netsh and pstools. But I didn't test it...PSTools: info and downloadhttp://www.sysinternals.com/Utilities/PsTools.htmlTo save the current network settings, open a dos-shelland type in: netsh -c interface dump > settings.txtNow there is a file you can open with notepad and edit the settings /it should be saved under C:\Documents and Settings\{Username}\Settings.txtHere you have to fill in the desired settings for yourremote pc. The file is well documented and will helpyou. When you have finished editing save the file.With psexec.exe you are able to execute commandsremote 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) FileClose($oFile) RunWait(@Comspec & " /c netsh -f C:\Settings.txt") FileDelete("C:\Settings.txt")The the following commandline:psexec \\IP -u USER -p PASSWORD -c changesettings.exeI cannot test it, so you will have to try.Regards, Buffo Link to comment Share on other sites More sharing options...
JamesNL Posted May 10, 2006 Share Posted May 10, 2006 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. Link to comment Share on other sites More sharing options...
Elkie Posted May 11, 2006 Author Share Posted May 11, 2006 Thanks for the input i'll give it a try Link to comment Share on other sites More sharing options...
herewasplato Posted May 11, 2006 Share Posted May 11, 2006 AutoIt can write to the registry of a remote computer:http://www.autoitscript.com/forum/index.ph...ndpost&p=152360You can change from DHCP to Static at the key for the active NIC:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\(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:http://www.autoitscript.com/forum/index.ph...showtopic=21229(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".) [size="1"][font="Arial"].[u].[/u][/font][/size] 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