Jump to content

Recommended Posts

Posted

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

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
Posted

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

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.

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
×
×
  • Create New...