Const PROFILE_SUBKEY = "SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList"
' 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 "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
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.
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 FlesherThe University of ChicagoNSIT/DCS1-773-834-8477