There are 4 likely symptoms:
Note that ScanDisk may need a couple of goes to complete after a lot of new files have been installed or deleted. This is normal.
- ScanDisk or Defrag simply hang and refuse to do anything.
- ScanDisk or Defrag 'cycle' - start, go so far, then re-start, over and over again.
- Defrag keeps muttering "Drive's contents have changed - Restarting" and never finishes.
- Defrag complains "Error Defragmenting Drive X. Windows cannot finish because it has encountered a problem".
Certain active programs can cause Scandisk and / or Defrag to "cycle" by interrupting them. Before running either it is best to Shut Down and Restart the computer, and then close anything you can easily get at which automatically starts on bootup. Examples:
- Screensavers: Either de-activate your Screensaver before running Defrag, or click on the Start button to bring up the Menu; leave it as it is. The aim is to prevent the Screensaver cutting in (or your having to keep moving the mouse), as it tends to disrupt defragmentation. Alternatively see the method for Automatically Suspending Screensavers.
- Disable any Anti-Virus program you have installed. AV programs are particular culprits for disrupting ScanDisk and Defrag. Disabling or shutting them down for sessions to run ScanDisk or Defrag will not affect security.
- Internet programs which run tasks on bootup (eg updating, collecting mail). If you cannot stop them, wait until they have finished.
- Other Programs: It may be necessary to close programs which run in the background. Press
Ctrl+Alt+Del . This will bring up a box entitled "Close Program". Select an application and click on "End Task". Ensure that you select programs you know are not needed by the system to continue working (eg 'Explorer' and 'Systray')! The programs listed may look weird, but with a little logic one can usually work out what they are. You may get some clues from the programs listed under 'Startup' in the Menu.
A. Clean Boot - Win98
Win98's System Configuration Utility can be used to help disable the usual startup routine. To bring it up, click on Start then Run and in the box type:
msconfig and press Enter or click OK.
B. Safe Mode
- Click 'Selective Startup' on the General tab.
- Click on all available 'Process ...' options below to clear them.
- Click on 'Apply' then OK and agree to the computer being restarted.
- Run Scandisk and / or Defrag.
- Call up the Utility again, and click on 'Normal Startup', then Apply and OK to reset the computer.
C. Real Mode (DOS)
- Shut Down Windows, choosing 'Restart Computer'.
- At the point where you see "Starting Windows" press F8 (or hold down the Ctrl key while booting with Win98), and choose "Safe Mode" from the Boot Menu.
- Run Scandisk and / or Defrag in Safe Mode.
- When done, shut down and restart Windows normally, and run Scandisk again.
Note: You cannot run Defrag in DOS mode - only ScanDisk. (See Page 3 - Doing It In DOS).
- Shut Down Windows, choosing 'Restart Computer'.
- At the point where you see "Starting Windows" press F8 (or hold down the Ctrl key while booting with Win98), and choose "Command Prompt only" from the Boot Menu.
That will bring you to the DOS Prompt. Type:
- This will run ScanDisk in DOS mode.
- When it has finished, reboot (
Ctrl+Alt+Del ) to restart Windows. Then re-run ScanDisk as normal.
D. Corrupt Applog Folder
Under Windows98, if Defrag hangs or reports it has encountered a problem the cause may be corruption in the
\Windows\Applog folder. This folder is consulted (by a 'Helper' called
Cvtaplog.exe ) when Defrag is set to 'Rearrange program files' for faster operation. Using Windows Explorer, open the folder, select all the files and delete them. Close Explorer, run ScanDisk and then try Defrag again.
The files in the Applog folder will be re-generated by the system. However, this will initially slow down Defrag quite noticeably when it starts up.
For an explanation of how the Applog folder tracks usage of programs to enable Defrag to optimise their arrangement see the Win98 Resource Kit Online Help. To install the Win98 Resource Kit insert the CD and Browse to:
\Tools\reskit\setup.exe and click on it. You will end up with two extra 'Help' alternatives - Resource Kit Tools Help & Resource Kit Books Online.
E. Forcing Defrag To Run First
(NB: This will only work if you have to complete the Logon box every time you start up).
If Defrag still 'cycles' under Windows98, it may be because some background program you cannot identify keeps interrupting it. It is possible to make Defrag run before the 'Logon' box appears provided the 'Logon' box appears on your PC, and thus before programs associated with your User Profile have loaded. This involves editing Registry. The procedure for this is the same as given on Page 4b, which you should read first.
- Open the Registry Editor ('regedit'), and navigate to:
- Create (via Edit) a new string value called
- Set (Modify) the Value to
- Save (Export) the Branch by selecting "RunServicesOnce" and ensuring the setting is for 'Branch'.
- Choose a name you will remember (eg
Defrag_1st.reg ) to call the exported Branch.
- Close Registry Editor.
Reboot, and Defrag will run. If it again hangs or fails to complete, seek technical help.
Defrag will not run again on bootup, as the Key will have been deleted from Registry automatically. If the problem persists and you have not identified the cause, find the saved Key file (eg Defrag_1st.reg ) and double-click on it to add (Merge) the String Value back if you need to Defragment again. This is not a recommended procedure! Try to find the real cause.
F. The Obscure ...
Sometimes the culprit is not a program listed as running and is highly obscure. The solution in such cases may be to download a patch or upgrade for a program or an updated device driver from the manufacturer's site. Checking for upgrades is a chore which should be done occasionally. Whilst doing so, look at any pages they may have listing known 'issues' (!) or do a site-search for scandisk & defrag.
If that does not help, try searching the Technical Database / Knowledge Base at Microsoft Support. You may find that something you have - a hardware device or an application - is on a list as being known to cause problems.