Jump to content
Sign in to follow this  
thehulk18

Defragging As Administrator To Speed Up Boot Time

Recommended Posts

By default, XP, Vista and Win7 are supposed to defrage the boot sector when booting. However, it is not always set to do so in the registry. Rather than go into the registry, it can be done manually very easily to help speed up your boot time. As follows:

 

Click on Start/All Programs/Accessories/Right click on Cmd Prompt and select to Run as Administrator.

At the Command Prompt: C:\Windows\system32>, type in defrag c: -b

 

It will look like this: C:\Windows\system32>defrag c: -b

 

The window will then look like this:

 

C:\Windows\system32>defrag -b C:

Microsoft Disk Defragmenter

Copyright © 2007 Microsoft Corp.

 

Invoking boot optimization on (C:)...

 

Pre-Defragmentation Report:

 

Volume Information:

Volume size = 49.99 GB

Free space = 21.12 GB

Total fragmented space = 2%

Largest free space size = 4.59 GB

 

Note: File fragments larger than 64MB are not included in the fragmentation statistics.

You may not see anything happening at first...let it finish.

 

You see in the last line that File fragments larger than 64MB are not included in the statistics, that's because they are not defragged, but they can be forced to defrag by using the same procedure above to run CMD Prompt as Administrator, then at the Command Prompt type in...defrag c: -v -w (Note spaces before each dash - )

 

Again...give it time to finish.

 

These two steps significantly reduced the boot time on a laptop I was working on.

 

I found these steps on more than one website, the following being one of them.

 

http://social.answers.microsoft.com/Forums/en-US/vistaperformance/thread/7be9d9da-a7bf-447b-ad66-41d8eb50de54

I was looking for the steps for Vista, but they also work on Windows 7, and XP (Must have Administrator password in XP)

Share this post


Link to post
Share on other sites

Thanks for this tip. But I am unable to get Cmd prompt to run as Admin, even though I am the only user of my XP Home, SP3 desktop. Instead I get C:\Windows>. And the R-click drop down menu for users does not include Admin.

How do I get this to work?

Share this post


Link to post
Share on other sites

When I tried it I get this message:

 

C:\Windows\system32 is not recognized as an internal or external command, operable program or batch file.

 

I have windows vista 64 bit OS.

Edited by Wicked_Rain

Share this post


Link to post
Share on other sites

> By default, XP, Vista and Win7 are supposed to defrage the boot sector when booting

 

Shame it does not work for XP though...

Defrag for XP does not support the -b or the -w parameters.

Share this post


Link to post
Share on other sites

I am unable to get Cmd prompt to run as Admin ... the R-click drop down menu for users does not include Admin

Open the Control Panel and click User Accounts.  If your user account's description reads "computer administrator", you do not need the "run as" function.  Click Start and Run, type CMD and click OK to open a command prompt.  Type Defrag C: -B and press Enter.  If Windows is installed on a drive other than C, substitute the appropriate letter.

Share this post


Link to post
Share on other sites

When I tried it I get this message:

 

C:\Windows\system32 is not recognized as an internal or external command, operable program or batch file.

thehulk18's use of the phrase "C:\Windows\system32>" is confusing.  Open the command prompt as Administrator, then type only

 

     Defrag C: -B

 

and press Enter.  Don't worry about including the path to the program — Windows knows where it is ...

Share this post


Link to post
Share on other sites

Shame it does not work for XP though... Defrag for XP does not support the -b or the -w parameters.

Defrag for XP doesn't include the W switch.  The B (boot optimization) switch, however, is supported.

Share this post


Link to post
Share on other sites

same thing here. even after right click and run as administer it brings me to C:\users\<myname> and the same error if I try to run from there

See post #7.

Share this post


Link to post
Share on other sites

I am running win7 64 bit. I followed the steps to defrag boot time. On my sys it will "invoke" defragmenter however it will not defrag anything.

C:\Windows\system32>defrag -b C:

Microsoft Disk Defragmenter

Copyright © 2007 Microsoft Corp.

displays and then go back to

C:\Windows\system32

Is there a posting or link to edit the reg to make this change?

I have almost a minuet of lag between the initial boot screen and the the o/s choice display.( dual boot windows 7/ XP).

Share this post


Link to post
Share on other sites

defrag -b C:

 

Try Defrag C: -B instead.

 

Is there a posting or link to edit the reg to make this change?

Not needed, boot optimization is enabled by default.  The relevent registry key is

 

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction

Share this post


Link to post
Share on other sites

When I ran the C:\Windows\system32>defrag c: -b command fragmentation only seemed to be decreased by 1%:

 

Invoking boot optimization on System (C:)...

 

 

Pre-Defragmentation Report:

 

Volume Information:

Volume size = 52.60 GB

Free space = 22.41 GB

Total fragmented space = 2%

Largest free space size = 19.45 GB

 

Note: File fragments larger than 64MB are not included in the fragmentat

ion statistics.

 

The operation completed successfully.

 

Post Defragmentation Report:

 

Volume Information:

Volume size = 52.60 GB

Free space = 22.41 GB

Total fragmented space = 1%

Largest free space size = 33.97 MB

 

Note: File fragments larger than 64MB are not included in the fragmentat

ion statistics.

 

 

So I ran the C:\Windows\system32>defrag c: -v -w but at the end it still said that file fragments larger than 64MB are not included in the fragmentat

ion statistics However, fragmentation was still reduced to zero, which is excellent:

 

Invoking defragmentation on System (C:)...

 

 

Pre-Defragmentation Report:

 

Volume Information:

Volume size = 52.60 GB

Cluster size = 4 KB

Used space = 30.66 GB

Free space = 21.94 GB

 

Fragmentation:

Total fragmented space = 1%

Average fragments per file = 1.01

 

Movable files and folders = 144242

Unmovable files and folders = 53

 

Files:

Fragmented files = 829

Total file fragments = 1495

 

Folders:

Total folders = 22260

Fragmented folders = 13

Total folder fragments = 94

 

Free space:

Free space count = 4438

Average free space size = 5.06 MB

Largest free space size = 16.10 GB

 

Master File Table (MFT):

MFT size = 185.25 MB

MFT record count = 189695

MFT usage = 100%

Total MFT fragments = 2

 

Note: File fragments larger than 64MB are not included in the fragmentat

ion statistics.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

×
×
  • Create New...