SAS Disk Cleanup Handler |
Description |
The SAS Disk Cleanup Handler searches for and cleans any temporary files that SAS generates, as well as any SAS Work and SAS utility directories. SAS Disk Cleanup Handler is a COM hook into the Microsoft Disk Cleanup Handler (cleanmgr.exe).
SAS Work directories have the format, #TD pid or _TD pid, where #TD is the SAS V6.X prefix and _TD is the SAS V7+ prefix. The pid part of the directory entry is interpreted as the process ID. If the process ID is no longer in use, the SAS Disk Cleanup Handler deletes the entry and the contents of the directory.
SAS Disk Cleanup Handler also removes SAS utility directories that have the following format:
SAS_utilNNNNPPPPPPPP_nodename
where
NNNN is a unique random number | |
PPPPPPPP is the hexadecimal representation of the process ID | |
nodename is the host name of the machine that created the directory. |
SAS Disk Cleanup Handler deletes the utility directories and contents only under the following conditions:
SAS Disk Cleanup Handler is run on the machine that represents the nodename and the process ID
PPPPPPPP is no longer in use.
Requirements |
The SAS Disk Cleanup Handler requires Microsoft .Net Framework 2.0 or greater for 32-bit Windows, Windows Itanium, and Windows x64 editions.
Using the Disk Cleanup Handler |
To run the Disk Cleanup Handler, complete these steps:
Type cleanmgr from the command prompt.
Note: You can also start the SAS Disk Cleanup Handler from Windows Explorer. Access My computer and right-click a local physical hard disk. Select Properties and double click Disk Cleanup.
Note: Disk Cleanup Manager will start. This process might take a few minutes.
Select SAS Temporary Files.
Note: If SAS Temporary Files is not listed, the SAS Disk Cleanup Handler is not installed.
Click View Files to list the currently detected SAS temporary files and directories. If a process is still active, then the file or directory will not be listed. Any files or directories to be saved should be cleared.
Click OK to save changes. Click Cancel to discard.
Click OK in the Disk Cleanup window to start the cleanup.
Check the EventViewer for any errors.
Note: Windows Server 2008 does not automatically install Microsoft Disk Cleanup Manager (cleanmgr.exe). In order to have Microsoft Disk Cleanup Manager installed as a default application, you must install Desktop Experience. To install Desktop Experience do the following steps:
Open Server Manager.
Select Add Features from the Actions menu.
Select Desktop Experience.
Automating Cleanup with Microsoft Task Scheduler |
With cleanmgr.exe you can configure specific tasks to perform the desired cleanups.
To configure Disk Cleanup Manager:
Select Start Run.
Type the following text in the Run dialog box: cleanmgr /sageset:n, where n can be any number between 0 and 65535.
Select the items that you want to be cleaned.
Select OK.
Note: You can also create a shortcut in your Windows folder to cleanmgr /sagerun:n (where n is the number in step 2). Type a name for the shortcut (for example, cleanuptask).
If you want to verify the settings, repeat steps 1 through 3.
The following steps apply to Windows XP Professional and Windows Server 2003:
Select Start All Programs Accessories System Tools Schedule Task.
Add the scheduled task.
Select Next.
Select Disk Cleanup or the shortcut that you created in step 2. If you are using the shortcut, select Next.
Select Next and configure.
Note: You must provide your user ID and password to run this task.
If not using the shortcut, then select the Open advanced properties for this task when you click Finish.
Select Finish when the step is complete.
If you are not using the shortcut, then the Properties dialog box should be displayed. Select the Task tab.
In the Run text box append /sagerun:#, where # is the number from step 2.
Check Event Viewer for any errors under Application.
The following steps apply to Windows Vista and Windows 7.
Select Start All Programs Accessories System Tools Task Scheduler.
Select Create Basic Task.
Type a name for the task in the Name field.
Select Next.
Select the appropriate triggers and options.
Note: Select Next to advance through the trigger options.
Select Action Start Program.
Select Next.
Type cleanmgr in the Program/script: text box.
Type the appropriate arguments for :/sagerun:#, where # is the number from step 2.
Select Next.
Select Finish.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.