new2autoit Posted June 16, 2006 Share Posted June 16, 2006 Hello everyone, I was bored so I decided to write a simple script of adding a pc to a domain. If anyone can do it better, please go ahead and post, also I really had to run so if anyone wants to finish it or modify it be my guest. Opt("WinsearchChildren", 1) Run(@ComSpec,@SystemDir) if WinActivate("C:\WINDOWS\system 32\cmd.exe") Then Send( " sysdm.cpl {enter}" & " exit {enter} " ) if WinWaitActive("System Properties") Then Send("{right}") controlClick("System Properties", "", "&Change...") WinWaitActive("Computer Name Changes") Send("!d") send("{tab}") ;add domain here send("Test") ; had to run couldn't finish it but the rest is very simple. EndIf EndIf Link to comment Share on other sites More sharing options...
Briegel Posted June 17, 2006 Share Posted June 17, 2006 Hello everyone, I was bored so I decided to write a simple script of adding a pc to a domain. If anyone can do it better, please go ahead and post, also I really had to run so if anyone wants to finish it or modify it be my guest. Opt("WinsearchChildren", 1) Run(@ComSpec,@SystemDir) if WinActivate("C:\WINDOWS\system 32\cmd.exe") Then Send( " sysdm.cpl {enter}" & " exit {enter} " ) if WinWaitActive("System Properties") Then Send("{right}") controlClick("System Properties", "", "&Change...") WinWaitActive("Computer Name Changes") Send("!d") send("{tab}") ;add domain here send("Test") ; had to run couldn't finish it but the rest is very simple. EndIf EndIf You can run "sysdm.cpl" directly -> run("control sysdm.cpl") But I think the best way is to use the microsoft tool "netdom.exe" included in Windows XP Support Tools. Link to comment Share on other sites More sharing options...
Developers Jos Posted June 17, 2006 Developers Share Posted June 17, 2006 a COM solution.. SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. 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