Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

RemapAndMoveUser Function

Windows Server 2003

The RemapAndMoveUser function transfers the security settings and user profile from one user account to another.

Syntax


BOOL WINAPI RemapAndMoveUserA(
  __in LPCSTR pComputer,
  __in DWORD dwFlags,
  __in LPCSTR pCurrentUser,
  __in LPCSTR pNewUser
);

BOOL WINAPI RemapAndMoveUserW(
  __in LPCWSTR pComputer,
  __in DWORD dwFlags,
  __in LPCWSTR pCurrentUser,
  __in LPCWSTR pNewUser
);

Parameters

 

Parameter Description

pComputer [in]

Specifies the name of the computer on which the function is run. This is a pointer to a null-terminated string, and the format of the string must be “.” or \\computer. If pComputer is NULL, the function will run locally.

dwFlags [in]

Specifies how the settings and user profile will be transferred. The following flag is optional.

REMAP_PROFILE_KEEPLOCALACCOUNT 0x0004

If pCurrentUser is a local user account, then the user account is retained.

pCurrentUser [in]

Specifies the existing user account. Specify the user account in DOMAIN\user or COMPUTER\user format. This user account must have a local profile.

pNewUser [in]

Specifies the new user account where the security settings and profile of pCurrentUser will be transferred. Specify the user account in DOMAIN\user or COMPUTER\user format.

Return Value

True if the settings and user profile are successfully transferred; otherwise, False. Use GetLastError to get the failure code.

Remarks

For more information about moving user profiles on a computer running the Windows Vista operating system, see the Knowledge Base article at the Microsoft Web site (http://go.microsoft.com/fwlink/?LinkID=78007).

Requirements

 

Client

Requires Windows XP

DLL

Requires profmap.dll

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.