Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


October 09, 2006

Painless Profile Migration

Migrate profiles without leaving your chair
RSS
Subscribe to Windows IT Pro | See More Migration Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here

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.

   Previous  [1]  2  3  Next 


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 October 18, 2006 (Article Rating: )


Where are the supporting scripts??

netdirtech October 18, 2006 (Article Rating: )


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 October 23, 2006 (Article Rating: )


very nice

nickjo67 November 07, 2006 (Article Rating: )


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 November 14, 2006 (Article Rating: )


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

jeremyschubert November 27, 2006 (Article Rating: )


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 December 01, 2006 (Article Rating: )


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 February 15, 2007 (Article Rating: )


Good!

spneo May 15, 2007 (Article Rating: )


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

perezjonestsisah@yahoo.com January 05, 2008 (Article Rating: )


 See More Comments  1   2 

You must log on before posting a comment.

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




Top Viewed ArticlesView all articles
Accessing Database Data with ADO

...

The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

Friday at PASS Europe 2006

Kevin talks about the closing day of the event and shares a funny Microsoft film. ...


Task Automation Whitepapers Essential Guide to E-discovery and Recovery for Microsoft Exchange

Continuous Data Protection and Recovery for Microsoft Exchange

Protecting (You and) Your Data with Exchange Server 2007

Related Events Check out our list of Free Email Newsletters!

Task Automation eBooks Spam Fighting and Email Security for the 21st Century

A Guide to Windows Certification and Public Keys

Keeping Your Business Safe from Attack: Patch Management

Related Task Automation Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.

Job Openings in IT


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Maximize your SharePoint Investment – 8 Cities
Discover best practices and tips for both architecting and administering SharePoint. Early Bird Price of $99 through Sept 15th.

Find a new job now on the all new IT Job Hound!
Search jobs, post your resume, and set up job e-mail alerts!

Master SharePoint with 3 eLearning Seminars
Learn how to build a better SharePoint infrastructure and enable powerful collaboration with MVPs Dan Holme and Michael Noel. Register today!

Top Tools for Virtualization Disaster Recovery & Replication
View this web seminar on August 14th to learn about two tools that will result in faster backup and restore with P2V disaster recovery.

SharePointConnections Conference Fall 2008
Don’t miss the premier event for Microsoft IT Professionals in Las Vegas, November 10-13. Register and book your room by August 25 and receive a FREE room night (based on a three night minimum stay).

VMworld 2008 - Sign Up Today!
Join your peers on September 15-18 at The Venetian Hotel in Las Vegas as VMware hosts VMworld 2008, the leading Virtualization event.



Increase Application Performance
Free White Paper by Editor's Best winner, Texas Memory Systems.

Microsoft® Tech•Ed EMEA 2008 IT Professionals
Advance your thinking with new ideas and practical real-world solutions at Microsoft’s FIVE day technical infrastructure conference 3-7 Nov., 2008. Register before 26 September 2008 to save €300.

Order Your SQL Fundamentals CD Today!
Learn how to use SQL Server, understand Office integration techniques and dive into the essentials of SQL Express and Visual Basic with this free SQL Fundamentals CD.

Are You Really Compliant with Software Regulations?
View this web seminar that will help you with compliance best practices and check out a management solution to assure that you won’t be in jeopardy of an audit.

Virtualization Congress Oct. 14-16 in London
Don't miss Virtualization Congress, the premiere EMEA conference dedicated to hardware, OS and application virtualization. Oct. 14-16.
Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technical Resources Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing