@leozack I had the same problem with copy profile, I had to manually delete some older profile information that was stuck in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList . Delete the profiles from that key that do not have a directory in %USERPROFILE% . Better yet, delete all profiles except for the administrative account that you want to copy the profile from. To get the floating cmd prompt to go away, call an hta using mshta instead of cscript. Here is my example: reg add HKLM\System\Setup /v CmdLine /t REG_SZ /d "mshta C:\Windows\System32\Sysprep\EditUnattend.hta" /f <html> <head> <title>Computer Deployment</title> <HTA:APPLICATION ID="objCompDeploy" APPLICATIONNAME="Computer Deployment" SCROLL="no" SINGLEINSTANCE="yes" maximizeButton="no" minimizeButton="no" sysMenu="no" > </head> <script LANGUAGE="VBScript"> Set WshShell = CreateObject("Wscript.Shell") Sub Window_onLoad window.resizeTo 450,400 'turn off setup flag in registry so we can query wmi WshShell.RegWrite "HKLM\SYSTEM\Setup\SystemSetupInProgress", 0, "REG_DWORD" 'query wmi for serial number Const wbemFlagReturnImmediately = &h10 Const wbemFlagForwardOnly = &h20 strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_BIOS", "WQL", _ wbemFlagReturnImmediately + wbemFlagForwardOnly) For Each objItem In colItems serialNumber = objItem.SerialNumber Next 'turn setup flag back on WshShell.RegWrite "HKLM\SYSTEM\Setup\SystemSetupInProgress", 1, "REG_DWORD" 'put the serial number that was retrieved in the textbox ComputerNameArea.Value = serialNumber End Sub Sub modUnattend run_button.Disabled = True Set fso = CreateObject("Scripting.FileSystemObject") base = Wshshell.ExpandEnvironmentStrings("%SystemRoot%") unattendFile = base & "\Panther\unattend.xml" computerName = ComputerNameArea.Value domainName = DomainNameArea.Value userName = UserNameArea.Value domainAdminPass = PasswordArea.Value OUName = OUNameArea.Value Set xmlDoc = CreateObject("Microsoft.XMLDOM") xmlDoc.load unattendFile 'Iterate through Unattend.xml searching for nodes and properties to replace Set oNodes = xmlDoc.documentElement.selectNodes("/unattend/settings/component/ComputerName") For each n in oNodes n.text = computerName xmlDoc.save unattendFile Next Set oNodes = xmlDoc.documentElement.selectNodes("/unattend/settings/component/Identification/Credentials/Domain") For each n in oNodes n.text = domainName xmlDoc.save unattendFile Next Set oNodes = xmlDoc.documentElement.selectNodes("/unattend/settings/component/Identification/Credentials/Password") For each n in oNodes n.text = domainAdminPass xmlDoc.save unattendFile Next Set oNodes = xmlDoc.documentElement.selectNodes("/unattend/settings/component/Identification/Credentials/Username") For each n in oNodes n.text = userName xmlDoc.save unattendFile Next Set oNodes = xmlDoc.documentElement.selectNodes("/unattend/settings/component/Identification/JoinDomain") For each n in oNodes n.text = domainName xmlDoc.save unattendFile Next Set oNodes = xmlDoc.documentElement.selectNodes("/unattend/settings/component/Identification/MachineObjectOU") For each n in oNodes n.text = OUName xmlDoc.save unattendFile Next 'launch the continuation of setup in a hidden window and wait for return 'if we dont wait, closing mshta, closes windeploy.exe WshShell.Run "%WINDIR%\System32\oobe\windeploy.exe", 0, True idTimer = window.setTimeout("closeHTA", 5000, "VBScript") End Sub Sub closeHTA window.close End Sub Sub commandLine WshShell.Run "%WINDIR%\System32\cmd.exe", 1, True End Sub </SCRIPT> <body> <table border="0"> <tr> <td>Computer Name:</td> <td><input type="text" name="ComputerNameArea" size="30" maxlength="15" value="computer"></td> </tr> <tr> <td>Domain Name:</td> <td><input type="text" name="DomainNameArea" size="30" value="domain.local"></td> </tr> <tr> <td>Container OU:</td> <td> <select size="1" name="OUNameArea"> <option value="OU=someou,DC=domain,DC=local">Desktops</option> <option value="OU=someotherou,DC=domain,DC=local">Laptops</option> </select> </td> </tr> <tr> <td>User Name:</td> <td><input type="text" name="UserNameArea" size="30"></td> </tr> <tr> <td>Password:</td> <td><input type="password" name="PasswordArea" size="30"></td> </tr> </table> <p align="right"> <input id=runbutton class="button" type="button" value="Continue" name="run_button" onClick="modUnattend"> <p align="center"> Note: The following characters are invalid for use in the computer name: " `~!@#$%^&<span onClick="commandLine">*</span>()=+[]{}\|;:'",<>/?. " You will not recieve any warning regarding incorrectly supplied parameters during setup. If any of them are incorrect, setup completion may take a long time. </body>