Title: Message
Chris,
         you could run a script before the migration to read the value of the ProfileImagePath entry in the registry and export that to a tab dilineated file... then add a few lines to the logon script in the new AD domain to parse their username against said tab seperated file and do a wsh.RegWrite to the same key with the old value.
HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProfileList\<appropriate RID>\ProfileImagePath
 is the registry key, and  %SystemDrive%\Documents and Settings\<appropriate user name> is the data format. Data type is REG_EXPAND_SZ. It's a really good idea to dimension a constant or two to avoid typing the key names over and over.. something like
Const HKEY_LOCAL_MACHINE = &H80000002
Const PROFILE_SUBKEY     = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"
 
Here's a code snippet from a script we have for our helpdesk to repoint profiles follows:
  '----------------------------------------------------------------------------
  ' Get the specified user's ProfileImagePath on the specified machine
  '----------------------------------------------------------------------------
  nRC = oRegistry.GetExpandedStringValue(HKEY_LOCAL_MACHINE, PROFILE_SUBKEY & "\" & sSID, "ProfileImagePath", sProfilePath)
  If nRC <> 0 Then
    Wscript.Echo "Error " & Hex(nRC) & " reading registry"
    Wscript.Quit(1)
  End If
 
  Wscript.Echo "Profile path:  " & sProfilePath
 
  Wscript.Echo
  Wscript.Echo "OS             Default Profile Path"
  Wscript.Echo "------------------------------------------------------------"
  Wscript.Echo "Windows NT     %SystemRoot%\Profiles\username"
  Wscript.Echo "Windows 2000   %SystemDrive%\Documents and Settings\username"
  Wscript.Echo
  Wscript.Echo "You can use environment variables when specifying the path"
  Wscript.Echo
  '----------------------------------------------------------------------------
  ' Set the ProfileImagePath directory
  '----------------------------------------------------------------------------
  nRC = oRegistry.SetExpandedStringValue(HKEY_LOCAL_MACHINE, PROFILE_SUBKEY & "\" & sSID, "ProfileImagePath", sNewPath)
  If nRC <> 0 Then
    Wscript.Echo "Error " & Hex(nRC) & " writing registry"
    Wscript.Quit(1)
  Else
    Wscript.Echo "Modified profile path"
  End If
End Sub 
 
 
Hope this helps!

         John A. Bjelke
             UNISYS
     Systems administrator
Supporting AFRL Kirtland AFB
          505.853.6774
   [EMAIL PROTECTED]

The contents of this Email communication are
confidential to the addressee.
If you are not the intended recipient you
may not disclose or distribute this
communication in any form but should
immediately contact the Sender.
The information, images, documents and views
expressed in this Email are personal to the
Sender and do not expressly or implicitly
represent official positions and policies of
Unisys Federal Systems or it's subsidiaries
and no authority exists on behalf of Unisys
to make any agreements, representations or
other binding commitment by means of Email.

 
 -----Original Message-----
From: cflesher [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 25, 2002 1:52 PM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] Profile question

First time postee, long time fan......
 
We are currently in the process of migrating users from NT4 domains to 2000. While most of the nodes are NT4 workstation, some are running 2000 workstation. My question is, once a user goes from connecting to an NT4 domain to a 2000 domain from a 2000 workstation, is there a scripting method to have the user use their old profile for their new logon. Obviously, one can copy profiles by hand. I'm looking for a way to automate this. Just looking for a few hints.....
 
Thanks.....
 
Chris Flesher
The University of Chicago
NSIT/DCS
1-773-834-8477
 

Reply via email to