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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

One way

Defrag not working

One way

by  jnicks  Posted    (Edited  )
Various approaches to getting Defrag to work are not so hot, you can tell by the discussion. SAFE mode is the best, but of course it trashes your desktop.

Personally I think it is MSTASK that is writing things to C: that is trashing DEFRAG, but any program that periodically writes to the drive being defragged will make idiot defrag restart.

RegHakr had a good one, in thread615-144489 RegHakr pointed out
[ul]
To defragment all your hard drives/partitions with no overhead (background programs running or TSRs/VXDs loaded), change to the \Tools\Mtsutil folder on your Win98 Setup cd-rom, and right-click on Defrag.inf. Select Install.

This will create a one-time entry (DEFRAG.EXE /ALL) under this Registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunServicesOnce

Defrag will start automatically next time you boot, before the login prompt, therefore before any other program loads.
[/ul]

An easy way to package this and without digging up the CD is to make a file, call it DEFRAG.REG, you can snip it...

Code:
REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce]
@="defrag /all /noprompt"

If you put it anywhere, say C:\stuff\defrag.reg, then the next time you want to defrag you just explorer to it and click-click. Reboot and Defrag will run before a lot of windows mud is loaded and perhaps Defrag will work. Worth a try.

Of course you can make a bat file

Code:
regedit c:\stuff\defrag.reg

It is easy.

Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top