Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cool Tip #3: Do it yourself Bootvis.exe 5

Status
Not open for further replies.

bcastner

IS-IT--Management
Aug 13, 2002
29,271
US
I like the utility bootvis.exe, but Microsoft has made it difficult to find. Note: I now direct folks to the right-hand panel of line #113 of the wonderful Kelly Theriot's site:
But what if you do not want to do all the work required, or want to schedule a bootvis optomization of your startup programs?

An odd discovery I explored, (and much thanks to David Candy), shows that you can force a bootvis optomization in the background of XP. I created a shortcut with this target:

Rundll32.exe advapi32.dll,ProcessIdleTasks

In the background this will take about 10-15 minutes to complete. This is the core of the Bootvis.exe optomization tool, and you can call it directly or schedule it.

To call it directly, copy the line above and then Start, Run, and paste the line into the window.

If you schedule it note that XP essentially does this incrementally every three days with sufficient idle time. For the serious fanatics, I include below the MSDN description of the process. I note only to the curious that the process rebuilds your prefetch cache, and if this is something you have wanted to do you might as well accomplish the prefetch optomization along with the physical defragmentation/location feature of your Startup files at the same time.

Kinda cool, I think.

Technical Details

From MSDN
Idle Task Scheduling: The ProcessIdleTask API

The file placement optimization, which is done no more often than once every three days, is an example of a task that is carried out when the system is deemed to be idle. System Restore and other features of Windows XP also attempt to defer some work until the system is deemed to be idle. There are also some done-once-after-setup work items that also operate under the Idle Task Scheduling mechanisms.

All of these "idle tasks" are controllable by a system API in advapi32.dll, ProcessIdleTasks. The API s sole purpose is to allow benchmarks a simple way to force any pending idle tasks to be executed immediately, without having to wait a lengthy period of time.

The API ProcessIdleTasks can be called in one of two ways, from the command line or synchronously from a program. To call ProcessIdleTasks from the command line, use this syntax:

Rundll32.exe advapi32.dll,ProcessIdleTasks

When called from the command line, the ProcessIdleTasks work is done in the background asynchronously. It can take 10 to 15 minutes for idle tasks to complete. Task Manager will report processes running, and the disk will likely be active during this time.

The ProcessIdleTasks API takes no arguments and returns a standard Win32 error code. The definition is:

DWORD
ProcessIdleTasks()

The API itself is synchronous, so it won t return until the idle tasks have completed.
 
I should note that you do not have to install Bootvis.exe in order to use this cool tip. You have all the .DLL support you need installed with XP.

 
bcastner,
[tab]Don't forget to put this in the FAQ.


James P. Cottingham

When a man sits with a pretty girl for an hour, it seems like a minute. But let him sit on a hot stove for a minute and it's longer than any hour. That's relativity.
[tab][tab]Albert Einstein explaining his Theory of Relativity to a group of journalists.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top