This documentation is archived and is not being maintained.
Utility Spotlight User Profile Deletion Utility
Code download available at: WhitneyUtility2009_05.exe (150 KB)
Over time, the network PCs in your organization may become cluttered with multiple user profiles, especially if they're shared computers used by many people. These profiles and their associated files and documents can easily eat up a sizable chunk of disk space. This is particularly true for accounts that are no longer active or in use. To remove inactive local profiles from computers in your environment, Microsoft offers the User Profile Deletion Utility, which is part of the Windows Server 2003 Resource Kit.
Install the User Profile Deletion Utility by running the downloaded delprof.msi file. No shortcuts are created. Instead you'll find the program installed in the directory C:\Program Files\Windows Resource Kits\Tools. Three files reside there: delprof.exe (the program's executable file), tooldownloadreadme.htm (documentation on how to install and uninstall the software), and delprof.mht (documentation on how to run the program itself).
You can launch the utility directly from its executable in Windows or from the command line. Double-clicking on the delprof.exe file opens a console window that asks if you want to delete all inactive profiles on the PC. Be aware that if you answer yes, the utility will remove all inactive profiles without requiring confirmation for each one. Obviously, that can have unforeseen consequences. Running the program from a command line and using specific options, in contrast, may be preferable as it gives you greater control. From the command line, you can also point the tool to any network PC, so there's no need for sneakernet to run it on your remote clients.
Launching the User Profile Deletion Utility from the command line lets you pass any of the following parameters:
/q—runs the tool in quiet mode so you're not prompted to confirm the deletion of each profile.
/i—does not inform you of any errors that occur.
/p—displays a message prompting you to confirm the deletion of each profile.
/r—removes only cached roaming profiles on the PC but leaves the local profiles alone.
/c:\\computer name—lets you launch the tool remotely by specifying the name of a network PC on which to run it.
/d:days—lets you specify the number of days after which the tool considers the profiles inactive and thereby deletes them.
You can view a list of all parameters by typing delprof /? at the command prompt, as shown in Figure 1. Whichever options you choose, I recommend always running the program with the /p parameter so that you'll be prompted for confirmation. Otherwise, the utility will attempt to delete all inactive profiles, including the admin account and any system accounts. For this reason, you should also exercise caution when deciding which accounts to remove and which to leave alone.
Figure 1 Options you can set for Delprof
The tool will remove all directories and files associated with a specific profile, including desktop icons and settings, Internet Explorer Favorites, program-specific files stored in the Application Data directory, and the My Documents directory. Since the program is run from a console window, the deleted files are not stored in the Recycle Bin. Once removed, the files cannot be undeleted, except possibly by a third-party recovery utility.
You can run the User Profile Deletion Utility on Windows 2000, Windows XP, and Windows 2003 Server. You'll find more details and a download link on the User Profile Deletion Utility (Delprof.exe) page on Microsoft downloads.
Lance Whitney is an IT consultant, trainer, and technical writer. He has spent countless hours tweaking Windows workstations and servers. Originally a journalist, he took a blind leap into the IT world 15 years ago.