WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

User Profiles

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Move or Copy a User Profile


How to Move or Copy a User Profile

Question:

I am trying to find a way to use Winbatch to automate the profile move or copy in NT and Windows 2000. Currently we have machines that are not in a domain. Once we add them to the domain it will create a different profile on the local machine. We need to re-point, copy or move the old profile to the new one. I am hoping to use winbatch to do this. Can anyone help ?

Answer:

The process is actually fairly simple to perform a copy operation on a profile. Do the following:
  1. Locate the old profile.

  2. Determine the location that you want to copy it to.

  3. Copy all files from the old profile location to the new profile location.

  4. Reset the ownership and permissions on the copy of the profile so that the user associated with it has the necessary file ownership & permissions to access the files.

  5. Use the Reg*() functions to load the ntuser.dat registry hive file [in the copy of the profile] into memory under a registry key in your own registry "space". Then reset the ownership & default permissions on the registry keys in that hive so that the user to which the profile is assigned may access the registry keys in the hive. When finished with this, unload the hive from memory.

Use the wntAccess*() and wntOwner*() functions to manipulate the permissions on folders, files and registry keys.


Article ID:   W16009
File Created: 2004:03:30:15:42:12
Last Updated: 2004:03:30:15:42:12