Windows Hard Disk Cleaner install....

Windows has a fairly useful tool called to clean up wasted space on the hard drive.  Unfortunately on Server 2008, it is not installed by default.  One has to add in that feature; which isn't a big deal, but it also requires bit of "Desktop Experience" and "handwritting."  Now what hand writting has to do with cleaning temporary files off of a hard drive I do not know.  Either way, this annoys me.  Here is how to install it with out going through the a fore mentioned trouble.

Copy cleanmgr.exe from the winSXS folder to the Windows\system32 folder and cleanmgr.exe.mui from the winSXS folder to the Windows\System32\en-Us folder.   If the machine is 64bit, copy them from the AMD64 folder, and if it's 32bit copy it from the x86 folder.

https://technet.microsoft.com/en-us/library/ff630161(v=ws.10).aspx

So far the only issue that I have seen is that this doesn't create that button that says "Disk Cleanup" when looking at the hard drive.  The program must be manually launched from the System32 folder.


UPDATE:

In Windows 2012r2; this procedure does not work.  It seems as though the files in WinSXS are compressed.  I ended up copying the two files from another server that did have the Desktop Experience installed.  However one only gets four categories to clean up; where as the one with the full desktop experience has over 7.


"Granger" over at ServerFaults.com posted this which is very handy:
If you want more "GUI-ness", proceed...
To get your new "Disk Cleanup" into the Start menu, create a shortcut to the "cleanmgr.exe" file. Put the new shortcut in the "%ProgramData%\Microsoft\Windows\Start Menu\Programs\Administrative Tools" folder; name it "Disk Cleanup". Now, when in the Start menu, you can just type "Disk Cleanup", and you'll have the option to start it as Administrator at the outset.
To get "Disk Cleanup" to show up as a button on a disk drive's Properties dialog box, you have to change the registry to add a new key and "Expandable String Value". Create a new .reg text file and paste in the following:
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\cleanuppath]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,6c,00,\
  65,00,61,00,6e,00,6d,00,67,00,72,00,2e,00,65,00,78,00,65,00,20,00,2f,00,44,\
  00,20,00,25,00,63,00,00,00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\cleanuppath]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,53,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,63,00,6c,00,\
  65,00,61,00,6e,00,6d,00,67,00,72,00,2e,00,65,00,78,00,65,00,20,00,2f,00,44,\
  00,20,00,25,00,63,00,00,00


No comments:

Post a Comment