Monday, April 10, 2017
Windows 7 Boot Optimization Error
Windows 7 Boot Optimization Error
I am not sure if you guys know you can manually invoke Windows 7 defragmentation Tool to do boot optimization by using the /b flag.
When you run defrag.exe, you get the following
Microsoft Disk Defragmenter
Copyright (c) 2007 Microsoft Corp.
The parameter is incorrect. (0x80070057)
Description:
Locates and consolidates fragmented files on local volumes to
improve system performance.
Syntax:
defrag| /C | /E [/H] [/M | [/U] [/V]]
defrag| /C | /E /A [/H] [/M | [/U] [/V]]
defrag| /C | /E /X [/H] [/M | [/U] [/V]]
defrag/T [/H] [/U] [/V]
Parameters:
Value Description
/A Perform analysis on the specified volumes.
/C Perform the operation on all volumes.
/E Perform the operation on all volumes except those specified.
/H Run the operation at normal priority (default is low).
/M Run the operation on each volume in parallel in the background.
/T Track an operation already in progress on the specified volume.
/U Print the progress of the operation on the screen.
/V Print verbose output containing the fragmentation statistics.
/X Perform free space consolidation on the specified volumes.
Examples:
defrag C: /U /V
defrag C: D: /M
defrag C:mountpoint /A /U
defrag /C /H /V
Notice there is no /B flag but it is there.
However on a fresh Windows 7 installation when you try to do this with Administrative Permission in a Command Prompt Window.
C:Windowssystem32>defrag C: /BYou get some message saying it cannot be done like the following:
Microsoft Disk Defragmenter
Copyright (c) 2007 Microsoft Corp.
Invoking boot optimization on (C:)...
Analysis: 100% complete.
Some registry entries were missing from the boot optimization section of the reg
istry. (0x89000017)
How to resolve this?
The issue is the idle tasks Windows is scheduled to run hasnt run once yet hence it cannot initialize boot optimization.
So to resolve simply open a Command Prompt Windows with Administrative Permission again and run the following commands to invoke the idle task.
C:Windowssystem32>Rundll32.exe advapi32.dll,ProcessIdleTasksAfter that the error message will be gone and you can run boot optimization manually.
Why doesnt this happen sometimes?
Because RunIdle task is scheduled to run eventually after sometime of idle usage
if you do boot defrag immmediately after installation,
RunIdle task hasnt got a chance to run at all so you have to invoke it manually
if you want to start the operation immediately.
Available link for download
Labels:
7,
boot,
error,
optimization,
windows