DOWNLOAD THE CODE:
Download the Code 93463.zip

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.

   Prev. page   [1] 2 3     next page



You must log on before posting a comment.

If you don't have a username & password, please register now.

Reader Comments

1. We seem to be missing three of the "supporting scripts", SaveProfile.bat, DelTemFiles.vbs, and SavePC.kix.

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

Article Rating 2 out of 5

Where are the supporting scripts??

netdirtech

Article Rating 3 out of 5

Hi Jeff and netdirtech! I'm Simon, the author of the article. I see that there was some problem with publication of support scripts. I've contacted already Windows Scripting Solutions stuff to replace current zip file with the correct one, but for now, you can contact me freely by mail, simonz@extreme.co.il, and I'll provide you all the scripts needed for the solution.

As for the questions: I didn't test migrating solution across many domains, but I think it will work with the following conditions are true: if there is a dual trust between participating domains(so you can access each participating computer from another); user, running the scripts is administrator of both computers participating in the migration. As for the image text, I am sorry, but I don't understand what do you mean. Please, contact me by mail and I'll try to solve the problem.

Best wishes, Simon Zeltser.

simon130

Article Rating 4 out of 5

very nice

nickjo67

Article Rating 5 out of 5

Hi Simon,

I already send you an e-mail to ask if you could send me the zip file with the files needed for the solution. Could you please do do.

Thanks in advance Martin

mvanhautte

Article Rating 4 out of 5

Great setup Simon. Have you had any response from the website re: uploading the proper script package?

jeremyschubert

Article Rating 4 out of 5

Due to a production error, all of the downloadable files for this article weren't originally available. This problem has been corrected. Sorry for any inconvenience this might have caused.

chumphries@penton.com

Article Rating 5 out of 5

Article was getting useful but then it stops ( Because I needed to migrate the profiles on remote machines, using the wizard wasn't an option. . . .). Where is the rest of the article ?

tbkc3

Article Rating 3 out of 5

Good!

spneo

Article Rating 4 out of 5

Like the soution, very easy to understand what happens in each phase.

perezjonestsisah@yahoo.com

Article Rating 4 out of 5

the Listenings and the download code links are not working

TauberC

Article Rating 4 out of 5

ditto on the download code links. They aren't working.

tstam69

Article Rating 4 out of 5

What happened to the rest of this article? Is this a teaser or trailer? Can someone please repost this along with the scripts?

fengandy@yahoo.com

Article Rating 1 out of 5