Administrator Is Unable to Delete Local Profile in Windows NT (238166)



The information in this article applies to:

  • Microsoft Windows NT Server 4.0 Terminal Server Edition
  • Microsoft Windows NT Server 4.0
  • Microsoft Windows NT Workstation 4.0

This article was previously published under Q238166
IMPORTANT: This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry

SYMPTOMS

When an administrator attempts to delete a local user profile in Windows NT 4.0, one of the following error messages may be displayed.
  • The following error message may be displayed when the administrator tries to delete the profile for a user account used to start a service:
    Can not delete Ntuser.dat. There has been sharing violation.
    The source or destination file may be in use.
  • The following error message may be displayed when the administrator tries to delete the profile folder of a user who is currently logged on:
    "Profile Folder" is a windows system folder and is required for Windows to run properly. It cannot be deleted.
  • The following error message may be displayed when the administrator tries to delete a profile in Windows NT Server, Terminal Server Edition, for a user who currently has a Terminal Server session:
    Can not remove desktop folder. There has been a sharing violation. The source or destination file may be in use.

CAUSE

These error messages occur when the profile is in use. The user might still be logged on or the user's session might not have closed completely.

RESOLUTION

To resolve this issue, log that user account off, and/or stop any services that are configured to start with that user account.

MORE INFORMATION

WARNING: If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

You can determine which user profiles are loaded by looking at the Security Identifiers (SIDs) in the HKEY_USERS subtree in the registry.

To View the SIDs Loaded in the HKEY_USERS Subtree

  1. Start Registry Editor (Regedt32.exe).
  2. On the Window menu, click HKEY_USERS. A default folder and the SIDs of the user or users (in Terminal Server) logged on to the computer is displayed. The SIDs for user accounts used for services are also displayed.

To Determine Which SID Corresponds to a User Account

  1. Start Registry Editor (Regedt32.exe).
  2. On the Window menu, click HKEY_LOCAL_MACHINE.
  3. Double-click each of the following keys to to open them:

    Software
    Microsoft
    Windows NT
    CurrentVersion
    ProfileList

    A list of all of the SIDs for users who have logged on to the computer once are displayed under the ProfileList key. The ProfileImagePath value is displayed in the right pane, which lists the user's profile folder name, which generally corresponds with the user account name.

Modification Type:MajorLast Reviewed:10/8/2006
Keywords:kbenv kbprb KB238166