I recently had to upgrade more than 1500 desktop PCs running Windows 2000 and different Microsoft Office versions to Windows XP and Office 2003. I had to destroy the current file system instead of upgrading it from the previous OS for several reasons, including incompatibility problems between the old and new versions of some of the company's internal software. I needed a way to back up all the users' profiles on the PCs, then restore the profiles after installing the new XP and Office 2003 software.
When you have 1500 PCs, physically going to every PC to perform the upgrade is too time-consuming. I decided to back up the profiles on a network share, then restore the profiles from that share onto the PCs so that I could perform all the work remotely. I first looked for existing solutions. I discovered that XP offers the Files and Settings Transfer Wizard, which lets you back up user profiles, store them on a network share, and restore them when needed. (For information about how to use the wizard, see the Microsoft article "Step-by-Step Guide to Migrating Files and Settings" at http://www.microsoft.com/technet/prodtechnol/winxppro/deploy/mgrtfset.mspx.) Although you can use this wizard on Win2K machines, it has some disadvantages. The wizard can backup only the profile of the currently logged on user. Consequently, you can't backup all the profiles that reside on one computer in one operation. More important, you have to run the wizard locally. Because I needed to migrate the profiles on remote machines, using the wizard wasn't an option.
I then discovered the User State Migration Tool (USMT). This Microsoft tool lets you easily migrate all user profiles and has a lot of options to offer, including the ability to migrate application settings and to use the tool in a script. However, USMT compresses the backup file, which means it takes a long time to back up and restore profiles, especially when users have large profiles that take up a couple of gigabytes. In my case, running this tool, even at night, wasn't a option because many users in the company work at night.
When I searched the Windows Scripting SolutionsWeb site for profile migration tools, I found a solution that Rick Early provided in the article "Copying Win2K PC Profiles" (October 2002, InstantDoc ID 26356). His solution lets you quickly migrate user profiles. However, it's written for PC-to-PC migrations. I needed a solution that would let me migrate profiles from a PC to a network share then back to the PC.
Because none of the existing solutions I found was ideal, I decided to adapt Rick Early's solution. My ProfileBackup solution executes in two phases: backup and restore. The backup phase involves running one main script (SavePC.bat) and three supporting scripts (SaveProfile.bat, Del-TempFiles.vbs, and SavePC.kix). The restore phase involves running one main script (CopyPC.bat) and two supporting scripts (RestoreRegistry-Profile.bat and CopyPC.kix).
The Backup Phase
In the backup phase, ProfileBackup performs a variety of tasks. It first checks the remote computer for profiles that weren't used by anyone in a defined period of time. If any old profiles exist, the solution deletes them to ensure that only the necessary profiles are migrated. Deleting old profiles helps keep network traffic to a minimum during the backup and restore operations. After deleting the old profiles, ProfileBackup copies the files it needs to perform several tasks on the remote computer. ProfileBackup then performs those tasks, which consist of deleting each profile's temporary files, backing up relevant profile registry keys, and copying all the profiles into a folder on the network share.
Now that you know the tasks that ProfileBackup performs in the backup phase, let's take a look at how it achieves them. The solution starts with the launching of SavePC.bat, which Listing 1 shows. This script uses the Microsoft Windows Server 2000 Resource Kit's User Profile Deletion utility (Delprof.exe). You can use Delprof .exe to delete user profiles on local or remote PCs. You use the utility's /d: parameter to specify the maximum number of days a user profile can remain inactive. As callout A in Listing 1 shows, in this case, Delprof.exe will delete profiles that have been inactive for more than 62 days. You can change this parameter to any number you think will work best in your environment.
As callout B in Listing 1 shows, SavePC.bat uses the BackupFolder variable to store the Universal Naming Convention (UNC) path to the network-share folder in which you want to back up your user profiles. When customizing this variable's value, make sure that you don't include unnecessary spaces before or after the UNC path because the command processor considers these spaces part of the variable's value. (The variable's value can contain as many spaces as needed.) To run SavePC.bat, you must have change permissions (NTFS/ Share) for the network share on which the backup folder resides.
2. Does this work only work when the domain is the same?
3. Give us a break with the image text, you're presenting characters that aren't on the keyboard, do we ignore them, use what's close?
Jeff
lospinoj October 18, 2006 (Article Rating: