Edit 10/28/2009: Looking for info about defragging boot files under Windows 7? Then Click here
Some time ago I posted a long message in this thread explaining what was REALLY going on behind the scenes when TweakXP was being used to optimize the boot files under Vista.
I mentioned that I wanted to create an app or some way for folks to do the same thing on their own without the need for TweakXP. (Especially since it was NEVER designed for Vista in the first place and some of its other options might be detrimental to Vista's health.) I have been swampped since then, but yesterday this issue came up again in the Sony forum here. So, after helping someone there with this issue I am copying it here as well.
------------Quoted from the Sony Forum here---------------------------------
Have you allowed Vista to defrag and reorder the boot files? Most laptop users never get a chance for this to be done, because they don't leave their machines idle long enough for the automatic process to kick in. There is a whole series of messages about this in the "top tweaks" thread. The tweak recommended is to use an app called TuneXP, which was designed for XP and use it to do some "magical" trick to defrag and reorder the bootfiles. I did a complete expose' of exactly what it does and it comes down to two simple commands.
Open notepad and paste these two lines in it:
Rundll32.exe advapi32.dll,ProcessIdleTasks
defrag -b %SystemDrive%
Next save the file on your desktop with an extention of .BAT.
(DO NOT NAME THE FILE DEFRAG.BAT) Or better yet I'll include an attachment right here!
It is a zip file but just open it and move the file to your desktop. Close
ALL running applications.
Then right click on it and
select run as administrator. The first line just tells Vista that all applications are idle and it can start a background task that is just sitting there waiting for this event to occur. That task analyzes the bootfile history that Vista maintains and creates a file with the optimum order for these files. The second line starts a specialized defrag process that uses that ordering information and puts these bootfiles into the proper sequence!
It will popup a command window and look like it is just sitting there hung on the first line. It's not, trust me. If you open Task Manager and view all running processes you will see Defrag and DfrgNtfs running. When they are done the command window will disappear. Be patient give it some time. It can take anywhere from a few seconds to an hour even. Just depends on how fragmented your files are. I just ran it and it took about seven minutes. Your disk drive light will show LOTS of activity.
Sit back, have a cup of coffee or whatever.
Just wait until the command window disappears. That cannot be stressed highly enough! DO NOT CLOSE THE WINDOW! BE PATIENT! LET IT FINISH! Now reboot and see if it made any difference in boot time.
Gary
------------------------end of quoted message-----------------
P.S. flamenko feel free to use this in place of the TweakXP segment in your primary post here if you wish. Just be sure to include the zip file as well, if you do.