Script Components
To run the script, you need the KiXtart and Robocopy resource kit utilities. You also need to download the following script files from the 26356.zip file at http://www.winscriptingsolutions.com, InstantDoc ID 26356:
- Savepc.bat, which Listing 1 shows, calls savepc.vbs.
- Savepc.vbs, which Listing 2 shows, writes the old PC's SID and other information to a three-line ASCII file, then calls savepc.kix.
- Savepc.kix, which Listing 3 shows, writes the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList registry subkey and its security settings to a file.
- Copypc.bat, which Listing 4 shows, copies the C:\documents and settings folder from the old PC, then calls copypc.kix and copypc.vbs. Copypc.kix must be called before copypc.vbs.
- Copypc.kix, which Listing 5 shows, overwrites the new PC's profile list with the old PC's list.
- Copypc.vbs, which Listing 6 shows, scans for and deletes SIDs that were specific to the old PC (which copypc.kix imported along with the domain profiles to the new PC). Copypc.vbs then deletes the C:\documents and settings\administrator folder.
Running the Script
Now, you're ready to give the script a try. This part is easy. Place all the KiXtart, Robocopy, Save, and Copy files in a network folder. Then, to copy the user profiles from an old PC to a new one, complete the following steps: . . .