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 


July 2003

Move User Profiles

Ready for some fiddling?
RSS
Subscribe to Windows IT Pro | See More Registry Articles Here | Reprints
Or get the Monthly Online Pass—only $5.95 a month!

Some Fiddling
Suppose Jake needs to move from one Win2K Professional workstation to another, and he wants to move his local profile. You might think that you need to perform only the following steps:

  1. Copy Jake's old profile from C:\documents and settings\jake on the old machine to C:\documents and settings\jake on the new machine.
  2. Create an HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList subkey whose name matches Jake's SID.
  3. Place a ProfileImagePath subkey, of type REG_SZ, in that subkey and fill it with C:\documents and settings\jake or \%systemdrive%\documents and settings\jake.

That process would almost work—but not quite. You would run into several problems. First, all the registry subkeys in ntuser.dat contain permissions that refer to the old machine's Jake. If Jake has been using a domain account to log on to the old machine and will continue to use that domain account on the new machine, you don't have a problem because his SID hasn't changed. However, if Jake has been using a local account on the old machine and will use a new local account on the new machine, you'll need to change the registry permissions to give the new SID full access to the subkeys in ntuser.dat.

Second, the files and folders in Jake's newly copied profile will similarly contain permissions that refer to Jake's SID on the old machine. Again, if Jake has been using a domain account, you don't have a problem. But if Jake uses a new local account to log on to the new machine, you'll need to change the file and directory permissions in his profile directory.

Finally, ProfileImagePath isn't the only registry subkey under HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList; a bunch of other subkeys—none of which are well documented—need your attention. Unfortunately, I can't offer much advice about how to create appropriate subkeys or what to put in them. But you need to create and populate these subkeys, so go ahead and let the OS do it. The easy way to completely establish Jake's ProfileList subkey and its attendant entries is to create Jake's new account, then have him log on and immediately log off.

The One-Size-Fits-All Approach
Let's try a step-by-step example. Suppose Jake once used a local account to log on to a machine named Old, and he'll now use a different local account to log on to a machine named New. Here's how to move his profile from Old to New.

  1. Copy Jake's old profile folder from Old to New. The %USERPROFILE% environment variable identifies the location of Jake's profile. (You must log on as Jake for this method to work.) Alternatively, look in the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\SID\ProfileImagePath subkey, where SID is Jake's SID. If you need to determine which SID is Jake's, use GetSID, which you can download from http://www.microsoft.com/windows2000/techinfo/reskit/tools/default.asp. GetSID's syntax is a bit odd:
  2. getsid  
      

    where accountname is the account's name and accountsource is the name of the machine that contains the account. Having the account name and machine name appear twice isn't a typo—both names must appear twice. In Jake's case, you would type

    getsid \\Old jake \\Old jake

    Now you have the SID and therefore the correct registry subkey.

  3. After you find Jake's profile, copy it to the location in which New keeps profiles—probably Documents and Settings, so his copied profile now sits in C:\documents and settings\jake.
  4. Create Jake's new local account on New. Log on as Jake, then log off. Log back on to the system as a local administrator, and use GetSID to find Jake's new SID.
  5. Open Jake's folder in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList. Double-click the ProfileImagePath subkey and replace its contents with \%systemdrive%\documents and settings\jake. Close your registry editor.
  6. To fix the file and directory permissions, right-click the Jake directory and choose Properties. On the Security tab, add a permission for Jake in the typical way: Click the Add button, then choose the local Jake account. Back on the Security tab, give Jake full control by clicking the box under Allow next to Full Control. Close the dialog boxes.
  7. Start up regedt32 (in Win2K or NT) or regedit (in Windows Server 2003 or XP). Navigate to the HKEY_USERS hive. In regedt32, click Registry, Load Hive; in regedit, click File, Load Hive. In the Load Hive dialog box, navigate to C:\documents and settings\jake. Inside that folder, select ntuser.dat and click OK. A second Load Hive dialog box asks you to fill in a Key Name text field. Enter Jake and click OK.
  8. On your registry editor's main screen, open the HKEY_USERS hive. In regedt32, click the Jake folder and choose Security, Permissions; in regedit, right-click the Jake folder and choose Permissions. Click Add and add a new permission entry for Jake. Click OK to return to the Permissions for dialog box. Give Jake full control over his registry subkeys by clicking the box under Allow next to Full Control, then click OK to return to the registry editor's main screen.
  9. Now that you're finished with the modifications, you need to write the changes back to the file. To do so, click the HKEY_USERS\Jake folder. In regedt32, click Registry, Unload Hive; in regedit, select File, Unload Hive. Choose Yes to confirm the action. Exit your registry editor.

Try logging on as Jake. You might get an error message stating that the system is unable to access an .inf file, but you'll receive this error message only once. In my experience, the preceding process moves desktop settings, preferences, IE Favorites and cookies, Outlook Express settings and mail, and so on.

The solution isn't perfect—for example, it might not transfer all your Outlook Express passwords. However, it's a fairly complete way to move a profile or load one from a backup.

End of Article

   Previous  1  [2]  Next  


Reader Comments
In the paragraph titled "The One-Size-Fits-All Approach", step one shows the getsid syntax, but, it appears that, the syntax is not complete.
Thanks,


John Shalack December 31, 2003


After creating the new account on step 2. Log in as administrator and copy the entire content of the old profile into the new profile. This seens to work for me. Is there any known problem by doing this way?

Eppie January 04, 2004


Microsoft KB "How to copy User Data to a New User Profile."
http://support.microsoft.com/default.aspx?scid=kb;en-us;811151

Dan February 16, 2004


Thanks this saved me from a lot of complaining from staff, we are moving domains (switched to samba :p), i could copy the profile ok, but the settings were lost (i.e. how icons on desktop were positioned ...) Thanks guys

Anonymous User February 24, 2005 (Article Rating: )


Last paragraph:"might not transfer all your Outlook Express passwords". Any ways to transfer passwords for Outlook or OE? Thanx.

EK April 17, 2005 (Article Rating: )


You must log on before posting a comment.

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




Top Viewed ArticlesView all articles
VMware and the Future of Virtualization

What's next for virtualization and business IT? Windows IT Pro senior editor Jeff James speaks with VMware President and CEO Diane Greene on the future of virtualization technology. ...

The Memory-Optimization Hoax

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

A Great Tool For Making Screencasts

I've started making product demos and have found a tool that has helped make the job easier--Camtasia. ...


Windows OSs Whitepapers Replay for Exchange: Enterprise Protection and an Affordable Price

Are You Satisfied?

A Preliminary Look at Deployment Plans for Microsoft Windows Vista

Related Events Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Disaster Recovery and Backup

A Guide to Windows Certification and Public Keys

Related Windows OSs 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.


ADS BY GOOGLE SPONSORED LINKS FEATURED LINKS

Critical Challenges of ESI & Email Retention
Are you storing too much electronic information? Get expert legal advice and better understanding of what you are required to do as an IT professional.

Become a fan of Windows IT Pro on Facebook!
Join us on Facebook and be a fan of Windows IT Pro!

Sustainable Compliance: Are You Having a Resource Crisis?
Read this white paper to examine trends in compliance and security management and review approaches to reducing the cost and operational burden of compliance.

Rev Up Your IT Know-How with Our Recharged Magazine!
The improved Windows IT Pro provides trusted IT content with an enhanced new look and functionality! Get comprehensive coverage of industry topics, expert advice, and real-world solutions—PLUS access to over 10,000 articles online. Order today!

Get It All with Windows IT Pro VIP
Stock your IT toolbox with every solution ever printed in Windows IT Pro and SQL Server Magazine plus bonus Web-exclusive content on hot topics. Subscribe to receive the VIP CD and a subscription to your choice of Windows IT Pro or SQL Server Magazine!



Order Your Fundamentals CD Today!
Gain an introduction to Exchange, learn server security requirements, and understand how unified communications can play a role in your messaging strategies with this free Exchange CD.
Windows IT Pro Home Register About Us Affiliates / Licensing Media Kit Contact Us/Customer Service  
SQL Connected Home IT Library SuperSite FAQ Wininfo News
Europe Edition Office & SharePoint Pro Windows Dev Pro Windows Excavator 
 
 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