Subscribe to Windows IT Pro
July 01, 1998 12:00 AM

DELPROF

Windows IT Pro
InstantDoc ID #3596
Rating: (2)
A tool that remotely deletes user profiles

User profiles in Windows NT 4.0 are collections of user-specific data, including desktop settings, the Programs menu, application settings (such as whether Microsoft Word hyphenates words), and the contents of the Send To menu that pops up when you right-click items on the NT desktop. If you store user profiles on a network share, every time users log on to a computer on the network their profile follows them.

Profiles' Problems
These roaming profiles are useful, but they can create clutter on network workstations. Suppose I'm an administrator with a roaming profile and I log on to the network from your workstation to fix a problem. NT downloads my entire profile to your hard disk and leaves my profile on your hard disk after I log off.

This residual profile is troublesome for two reasons. First, it consumes space on your hard disk. Second, it might include sensitive information that I don't want you to access. For example, if I write myself a note in Notepad and leave the note on my desktop, my profile includes a copy of the note. When I log off your workstation, the note remains on your hard disk. If your computer has an NTFS-formatted system disk, NTFS permissions protect access to the profile. But if the disk is FAT-formatted, nothing prevents you from reading my note.

As an administrator, I can change your computer's Registry to tell NT not to keep local copies of roaming profiles on your machine after the profile's owner logs off. If I go to HKEY_LOCAL_MACHINE\SOFTWARE\ Microsoft\Windows NT\ CurrentVersion\Winlogon, add the DeleteRoamingCache value entry (type REG_DWORD), and set DeleteRoamingCache to 1, your workstation won't keep my profile after I log off.

But if you have a roaming profile, your workstation won't keep your profile after you log off either; so, this Registry change will force you to wait for the profile to download every time to log on to your workstation. You probably won't thank me for making this change.

I need to remove my profile from your machine without affecting the way your workstation treats your profile. And, I can't simply go to the User Profiles tab on Control Panel's System applet to remove my profile before I log off your computer because I can't remove the profile I'm logged on under.

Delete Remote Profiles
To remove my profile from your hard disk, I need a remote profile zapper, a program I can run when I get back to my desk that erases the copy of my profile from your hard disk. Microsoft Windows NT Server 4.0 Resource Kit provides just such a tool, DELPROF.

The syntax for DELPROF is

delprof [/p] /c:\\<remotecomputername> 

The /p option tells DELPROF to prompt me before it deletes any profiles from your machine. If your computer's name is GOLDEN, I type

delprof /p /c:\\golden

on my computer to remove my profile from your hard disk. NT then shows me all GOLDEN's profiles, one at a time, and asks whether I want to delete each profile. Here's a sample dialog:

Delete \\GOLDEN\admin$\Profiles\Administrator? (Yes/No/All) n
Delete \\GOLDEN\admin$\Profiles\NormUser? (Yes/No/All) n
Delete \\GOLDEN\admin$\Profiles\Mark? (Yes/No/All) y
Deleting \\GOLDEN\admin$\Profiles\Mark...  [Ok]

Clean Up Your Local Hard Disk
DELPROF can also easily remove multiple profiles from one computer. When I try out new programs on my NT workstation, I create user accounts that I use only once. After a while, my Profiles directory contains a lot of profiles that I haven't used in months.

I could use Control Panel's System applet to delete these accounts one by one, but DELPROF offers a better solution:

delprof [/q] /d:<numdays> 

This command deletes all profiles that no one has touched in numdays days. The /q option tells DELPROF to complete the deletions without prompting me for responses. For the easy solution to the tricky problem of removing unneeded roaming profiles, DELPROF earns a spot on the resource kit's Wall of Fame.

Related Content:

ARTICLE TOOLS

Comments
  • Anonymous User
    8 years ago
    Nov 23, 2004

    Put the /q parameter first and/or use a wise script instead of a batch file

  • Anonymous User
    8 years ago
    Nov 09, 2004

    Remote Profile Cleaner is awesome it has filled in the needs left wanting by Microsofts DELPROF.exe that seems to not allow /Q in a script file.

    Thanks for the heads up!!!

  • Frantic Freddie
    8 years ago
    Aug 11, 2004

    Hi JavaGal,

    You might try Remote Profile Cleaner 2.5 (freeware). I found it on http://www.no-nonsens.nl and seems to work ok.

  • JavaGal
    8 years ago
    Aug 09, 2004

    Does anyone know -- is there anyway to get Delprof to delete all but (say, my pretend acc't, default user, and administrator)?

  • James Villella
    9 years ago
    Sep 19, 2003

    Hi Ed,

    My work-around for this batch file problem is to run the utility directly through the scheduler. When adding the job with the wizard's help, don't forget to "Open advanced properties for this task when I click Finish". This is so you can add the /q /d:nn command options.

    Jim in Grand Forks

You must log on before posting a comment.

Are you a new visitor? Register Here

advertisement

advertisement

Windows is a trademark of the Microsoft group of companies. Windows IT Pro is used by Penton Media Inc. under license from owner.