I used the software Netdom.exe basing myself on this:The NETDOM used is "special Windows XP " , older versions will not avail you nothing . A small startup script for linking the computer to the domain and to create an account :
echo please wait
Hoping that it helps my automated deployment works 100 %.
@ NETDOM JOIN % computername % / domain : domaine.fr / userd : admindudomaine / passwordd: passwordadmin
@ shutdown- r-f - t 5 - c " the computer % computername % has been added to the field "
@ del script.bat