PDA

View Full Version : Vista Defragging


Kal-EL
06-14-2009, 10:44 AM
First, run cmd.exe as an Administrator by using one of these three:
1) Start, Programs, Accessories, then right click and select Run as Administrator; this doesn't work for me.
2) Some say click Start, type "cmd" into the search box, and press ctrl+shift+enter; this also doesn't work for me.
3) Create a cmd shortcut: Open your C:\ drive and follow: Windows, System32, then click something and start pressing c to cycle through until you find cmd.exe (or look manually but it's a long list); copy paste to your desktop or wherever you keep stuff, then right click on it and select Run as Administrator.

In the prompt type "defrag c:" or whatever your drive letter is. After this, there are a number of command lines that give you a lot more control. You add them to "defrag c:" as shown below, much like editing a property tag.
1) Type "defrag c: -v" if you want to see a detailed analysis of the defrag, vs normal Vista defrag that tells you nothing about the results.

2) Type "defrag -c" if you want to defrag all your drives. Before SP1 you couldn't even do other drives than the OS drive; this lets you do them all at once.
3) Type "defrag c: -w" to do a full defrag. Normal Vista defrag ignores certain-sized clusters as Microsoft claims they don't impact performance. "-w" forces it to actually fully defrag your HDD. All people here who really tweak their hardware will appreciate even minute performance increases such as what this offers.4) Type "defrag c: -f" to run the defrag even when you're below 15% disk space.
Normally Vista won't allow you to run defrag if you have less than 15% free drive space. 5) Type "defrag c: -i" if you want the defrag to run in the background when the disk is idle. I don't use this as I worry that writing to the disk during defrag makes it less effective.
6) Type "defrag c: -b" if you want to defrag/optimize boot files specifically. Try this after a normal defrag. Also, make sure you're trying to run this on the drive that actually has your OS!


Reading Materials:
http://www.nerdgrind.com/disk-defragment-windows-vista-from-the-command-line/
http://technet2.microsoft.com/windowsserver/en/library/552ed70a-208d-48c4-8da8-2e27b530eac71033.mspx?mfr=true
(Use the hyphens shown above, not the brackets, but same idea)

http://www.auslogics.com/en/software/disk-defrag/download and http://www.auslogics.com/en/software/registry-defrag/download