HOW TO: Clean Profiles By Using the Cprofile Command in Terminal Services

Article translations Article translations
Article ID: 320186 - View products that this article applies to.
This article was previously published under Q320186
Expand all | Collapse all

On This Page

SUMMARY

This step-by-step article describes how to clean profiles by using the Cprofile command in Terminal Services. The Cprofile command removes wasted space from profiles, and removes user-specific file associations from the registry if user-specific file associations are turned off.

Users can use file associations to associate a specific program with a specific file type. A server uses file associations to determine what program to use to access files of a particular type. File types are registered by using Explorer. With per-user file associations, each user can have a different program associated with a specific file type. For example, one user might have .doc files associated with Microsoft Word, and another user might have .doc files associated with WordPad.

Note that user-specific file associations in Microsoft Windows NT 4.0, Terminal Server Edition are turned on or off by using the Peruser command. If the user-specific file associations are turned on, Cprofile removes only the wasted space from the user's profile. If user-specific file associations are turned off, Cprofile also removes the corresponding registry entries.

For additional information about the preceding topic, click the article numbers below to view the articles in the Microsoft Knowledge Base:
257592 Changes in File Types/Association Features in Windows 2000
186537 Terminal Server Commands: PERUSER
When items are removed from a user's profile, the corresponding registry does not become smaller. Cprofile is useful in clearing this wasted space from the registry.

NOTE: Profiles that are currently in use are not modified, and you must be an administrator to run Cprofile.

Syntax for the Cprofile Command

Use the following syntax for the Cprofile command:
cprofile [/l] [/i] [/v] filelist

cprofile [/i] [/v] filelist

Parameters

  • /?
    Displays the syntax for the command and information about the command's options.
  • /l
    Cleans all local profiles. You can also specify a list of additional profiles in the filelist parameter.
  • /i
    Interactively prompts the user with each profile.
  • /v
    Displays information about the actions that are being performed.
  • filelist
    A list of files from which you want to remove user-specific file associations. Separate each file in the list with a space. File names can contain wildcard characters.

    NOTE: Use quotation marks to enclose paths that contain spaces. For example, type cprofile "c:\documents and settings\tester\ntuser.dat" "c:\documents and settings\tester2\ntuser.dat".

An Example of Using the Cprofile Command

To clean all local profiles and clean an additional profile by using a network path, type cprofile /l /i /v "\\server\C$\Documents and Settings\tester2\ntuser.dat" at a command prompt, and then press ENTER. The command interactively prompts you with each profile, and displays information about the actions that are being performed, similar to the following prompts:
Processing file:  C:\Documents and Settings\Tester\NTUSER.DAT
Modify (Y)es, (N)o, or (Q)uit [default=n]? y
Processing file:  C:\Documents and Settings\Administrator\NTUSER.DAT
Modify (Y)es, (N)o, or (Q)uit [default=n]? n
Processing file:  \\zippy\C$\Documents and Settings\Tester2\ntuser.dat
Modify (Y)es, (N)o, or (Q)uit [default=n]? y
					

Troubleshooting

Note that profiles that are currently in use are not modified. To work around this issue, schedule the Cprofile command to run when the server is not busy.

REFERENCES

For more information about Terminal Services commands, view the following Microsoft Web site:
http://technet.microsoft.com/en-us/library/cc725766.aspx

Properties

Article ID: 320186 - Last Review: November 1, 2006 - Revision: 3.2
APPLIES TO
  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional Edition
Keywords: 
kbenv kbhowto kbhowtomaster KB320186

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com