# Defrag on reboot



## Toddles18 (Jul 18, 2001)

A while ago I read a post that told me how to do a one time deal to defrag windows before windows fully starts up to prevent programs running in memory from screwing with it. Problem is I forgot how to do this. So whats the secret?


----------



## brianF (Dec 2, 1999)

DEFRAG.INF - DEFRAGMENT ALL DRIVES ON SUBSEQUENT WINDOWS STARTUP
The Disk Defragmenter for Windows 98 (DEFRAG.EXE) may start and not complete its task. If repeated attempts to defragment the drive are unsuccessful, it may be because an application is writing to the disk. The Disk Defragmenter cannot share access to a drive with other tasks. 

An application loading automatically at startup may interfere with DEFRAG. Run DEFRAG before applications load at startup by adding a value for DEFRAG.EXE /ALL to the RunServicesOnce key in the registry.

To add a value for DEFRAG.EXE /ALL to the RunServicesOnce key:

Select DEFRAG.INF in the \Tools\MTSutil folder on the Windows 98 CD.

Right-click DEFRAG.INF
-or-
Hold down the SHIFT key and press F10.

Choose INSTALL to add the value for DEFRAG.EXE /ALL.


----------



## Mosaic1 (Aug 17, 2001)

I am attaching an inf file to add defrag to your runonce key.
It will have a txt extension. Change that extension to .inf and right click, choose install.


----------



## Mosaic1 (Aug 17, 2001)

Toddles18 PM'd me. I forgot to attach the file. I'm sorry. This is the same as following brianF's instructions. I have an HP and don't have all the extras founf on a normal Install CD. In the event that anyone else is in the same situation, here's the file.
Change the extension to >inf, right click and choose install.


----------

