Microsoft KB Archive/218160

= Disk Defragmenter Hangs After Choosing Disk to Defragment =

Article ID: 218160

Article Last Modified on 5/7/2007

-

APPLIES TO


 * Microsoft Windows 98 Standard Edition
 * Microsoft Windows Millennium Edition

-



This article was previously published under Q218160



SYMPTOMS
The Disk Defragmenter tool may stop responding (hang) after you choose a disk to defragment.



CAUSE
This behavior can occur due to corrupt files, folders, or bad sectors on your hard disk.

This behavior may also occur if a program that is running in the background is accessing your hard drive.



RESOLUTION
To work around this behavior, follow these steps:
 * 1) Set Windows to show all files. To do this, open Windows Explorer, and on the Tools menu, Click Folder Options.
 * 2) Click the View tab, click Show all files for Windows 98 or Show hidden files and folders, Click Apply and then click OK.
 * 3) Delete the Applog folder from C:\Windows, and then run the Disk Cleanup Tool.

The Disk Cleanup Tool provides an easy interface to remove temporary internet files, .tmp files, and other optional components. To start the Disk Cleanup Tool:

 Click Start, point to Programs, point to Accessories, point to System Tools, and then click Disk Cleanup. Select the drive you wish to clean up, and then click OK. The Disk Cleanup menu is displayed with the files that you need to delete are already selected. NOTE: If you wish to take this opportunity to remove other items that are not automatically selected you can do so. If you are not familiar with the Disk Cleanup Tool, you might want to remove the items at a later date. For additional information about the Disk Cleanup Tool, click the article number below to view the article in the Microsoft Knowledge Base:

186099 Description of the Disk Cleanup Tool in Windows 98



After you have removed the Applog folder and the temporary files in the steps above, run ScanDisk and then run the Disk Deframenter again.

Real Mode Scandisk
NOTE: Windows Millennium Edition (Me) does not include real mode support. If needed, you can start your computer with the startup disk, and then run ScanDisk.

If you run the ScanDisk utility and it doesn't find any errors, and then you try to run the Disk Defragmenter utility in Safe mode and it still does not complete, try to run ScanDisk from an MS-DOS prompt (real-mode).

First, configure ScanDisk to detect disk timeouts and check each cluster five times while performing a surface scan. To do so, follow these steps:  Find the Scandisk.ini file in the Windows\Command folder. Double-click the file, and if prompted, use any text editor (such as Notepad) to open the Scandisk.ini file. Find the [Environment] section in the file. If the section does not exist, use the example below and create an [Environment] section with these parameters:

[Environment]

ScanTimeOut=On

NumPasses=5

Note that the "ScanTimeOut=" and "NumPasses=" lines may already exist, but with different values, if they do, change the existing values.</li> Save and then close the Scandisk.ini file.</li> Click Start, click Shut Down, click Restart the computer in MS-DOS mode, and then click Yes.</li> At the command prompt, type the following line and then press ENTER to run ScanDisk

scandisk :

where is the drive letter of the hard disk you want to check. Note that you should run a surface scan when ScanDisk prompts you to do so, repair any errors that ScanDisk finds, and view and save the log file that ScanDisk creates.</li> When ScanDisk is finished, type exit and then press ENTER to return to Windows 98.</li> Run Disk Defragmenter again.</li></ol>

If you still have problems after you complete the steps above, it may be necessary for you to run a diagnostic utility designed for your specific hard disk. If you do not have the diagnostic utility that came with your computer, contact your hardware manufacturer. If you have upgraded your hard disk since you acquired your computer, and you do not have a diagnostic utility, you may be able to download these files from the manufacturer's Web site. Check with your hard disk manufacturer for additional information.

To close programs that are currently running
1. Press CTRL+ALT+DELETE.

2. In the Close Program dialog box, click any program in the list, except Explorer or Systray, and then click End Task. If you are prompted to click End Task again, do so.

3. Repeat steps 1-2 for each program listed in the Close Program dialog box, except Explorer and Systray.

4. Start the Disk Defragmenter tool.

<div class="status_section">

STATUS
The third-party products that are discussed in this article are manufactured by companies that are independent of Microsoft. Microsoft makes no warranty, implied or otherwise, regarding the performance or reliability of these products.

<div class="moreinformation_section">

MORE INFORMATION
For additional information about issues using Disk Defragmenter, click the article numbers below to view the articles in the Microsoft Knowledge Base:

186978 "Drive's Contents Have Changed: Restarting..." Message When You Use the Disk Defragmenter Tool

259030 APC PowerChute Plus Causes Disk Defragmenter to Hang

Additional query words: defrag wmehemmay hangs freeze freezes lock locks up 10% wmehem

Keywords: kbdefrag kbprb KB218160

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.