The document is archived and information here might be outdated


This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Assigns a new name to a profile.

HRESULT RenameProfile(
  LPTSTR lpszOldProfileName,
  LPTSTR lpszOldPassword,
  LPTSTR lpszNewProfileName,
  ULONG_PTR ulUIParam,
  ULONG ulFlags


[in] A pointer to the current name of the profile to rename.


[in] Always NULL.


[in] A pointer to the new name of the profile to rename.


[in] A handle to the parent window of any dialog boxes or windows that this method displays.


[in] Always NULL.


The profile was successfully renamed.


The profile password is incorrect.


The user canceled the operation, typically by clicking the Cancel button in a dialog box.

The IProfAdmin::RenameProfile method assigns a new name to a profile, if it has one. If the profile to rename is in use by a client when RenameProfile is called, RenameProfile marks the profile and returns S_OK instead of attempting the rename operation while the profile is in use. When the profile is no longer being used, RenameProfile assigns it the new name.

The old and new names of the profile can be up to 64 characters in length and can include the following characters:

  • All alphanumeric characters, including accent characters and the underscore character.

  • Embedded spaces, but not leading or trailing spaces.

The lpszPassword should always be NULL or a pointer to a zero-length string.

© 2016 Microsoft