Hello,
I've been working on a loop to migrate information from our old Windows 2000 Citrix Farm to our new Windows 2003 Citrix Farm. Due to application differences, we're not going to let the W2K profiles roam onto the 2003 servers.

Here is some code I wrote to migrate the \Desktop and \favorites shares from the old roaming profile location, and it works. It does not open the old NTUSER.DAT yet...


I need to modify this code to go into the \\corpfile\profiles\@userid directory and open the NTUSER.DAT that is here, then browse to \HKCU\Network\* and export it, then the HKCU\Printers\Connections\* keys, export them, then add this information into the current registry in HKCU.

What I don't know is how to
1. Load the old NTUSER.DAT as a hive
2. Navigate it once loaded, and then export these specificed Keys
3. Take whatever code does #1 & #2, then insert it into this loop.

ANY IDEAS ARE GREATLY APPRECIATED.

PLEASE AND THANKS.

-Ron

code:


$CitrixCheckVar = ReadValue ("HKEY_CURRENT_USER\Software\SchnitzerCitrix", "2K3ProfileMigrateDone");

IF $CitrixCheckVar = 1
? "This key exists, and therefore the ELSE Section has been done!";
ELSE

use w: /d; disconnects the drive first, temp mapping to copy files and folders from old profile
use w: \\hydrogen3\personal_shares;

use x: /d; disconnects the drive first, temp mapping to copy files and folders from old profile
use x: "\\corpfile\profiles\@USERID";

use y: /d; disconnects the drive first, temp mapping to copy files and folders from old profile
use y: "\\hydrogen3\personal_shares\@USERID";

copy "X:\Desktop\*.*" "y:\OldCitrixDesktop\" /s ; copies the files from OLD Citrix TSE Desktop to new one
copy "P:\Internet\Favorites\*.*" "c:\documents and settings\" + @userid + "\Favorites\" /s ; copies the files from OLD Citrix TSE Favorites to new one
copy "W:\*.lnk" "c:\documents and settings\" + @userid + "\Desktop\" ; copies a shortcut to P:\OldCitrixDesktop\ on new citrix desktop

use w: /d;
use x: /d;
use y: /d;

Writevalue("HKCU\Software\SchnitzerCitrix","2K3ProfileMigrateDone","1","REG_SZ")
ENDIF