[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 628
  • Last Modified:

Regedit syntax and how to use the /R:user switch

I want to export users outlook settings before recreating their roaming profiles, so they can later be re-imported into their new profiles.

If I log into a XP workstation as a particular user and run a script containing the following line, it works fine  it creates outlook.reg, so that after re-creating their roaming profile, and logging back in, I can run outlook.reg, and their outlook settings are restored.

regedit.exe /E z:\outlook.reg "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles"

However, I want to do this from my 2000 domain server for multiple users without logging in as each user. Why does the following line not work to create the outlook.reg file (where %1 stands for the username)?

regedit.exe /R:f:\Profile\%1\ntuser.dat /E f:\Home\%1\outlook.reg "HKEY_CURRENT_USER\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles"
0
hamisherskine
Asked:
hamisherskine
  • 3
1 Solution
 
ACollyerCommented:
You can use reg.exe (it comes with XP but I believe it's available on the Win2k CD) to load the ntuser.dat into a temp hive and export from there. Of course, the paths in the resulting .reg file will reflect the name you give to the temp hive, so when you go to import, make sure you mount the new ntuser.dat to the same place.

reg load HKLM\TmpHive "f:\Profile\%1\ntuser.dat"
regedit /e z:\outlook.reg "HKEY_LOCAL_MACHINE\TmpHive\Software\Microsoft\Windows NT\CurrentVersion\Windows Messaging Subsystem\Profiles"
reg unload HKLM\TmpHive


You could actually do that from an XP box if you map a drive to your profiles share.
0
 
ACollyerCommented:
You could alternatively do a find/replace on the resulting .reg file to replace "HKLM\TempHive" with "HKEY_CURRENT_USER", so you can get your users to merge the .reg file themselves and still have the settings land in the right place... It would save you mounting the new ntuser.dat for each user, anyway :)
0
 
hamisherskineAuthor Commented:
Thanks ACollyer. As you indicate, I now need to find the right command line utility to do the search and replace. Any suggestions?
0
 
ACollyerCommented:
I haven't tried this app myself, but have a look at http://www.bestcode.com/html/findreplace.html
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now