Bypass Windows 98's never-ending defrag operation

By Greg Shultz, Special to ZDNet Asia
Friday, October 22, 2004 01:46 PM

In almost all cases, the chunks of data at the beginning of the hard disk are unmovable areas belonging to the swap file associated with Windows 98’s Virtual Memory management scheme. My research and the success of my solution leads me to believe that the cause of the “Drive contents changed: restarting…” message is a combination of Disk Defragmenter itself and Windows 98’s Dynamic Virtual Memory management scheme.

When Disk Defragmenter encounters the swap file, it will bump into a very large chunk of the hard disk marked as unmovable and will have to begin moving large chunks of data all around it in order to place files that fall before and after the swap file in contiguous order. As this occurs, Disk Defragmenter seems to depend on the swap file to assist the utility in the data move operation. If the swap file itself is heavily fragmented, then Windows 98, with its Dynamic Virtual Memory management scheme, must make adjustments to the size of the swap file. When this occurs, there is obviously hard disk activity that causes the drive contents to change and thus causes Disk Defragmenter to start all over.


Configuring Disk Defragmenter to automatically disable screen saver
If you want to ensure that the screen saver does not launch while you are defragmenting your hard disk, you can configure Disk Defragmenter to automatically disable the screen saver when it is running by adding a little setting to the registry. To begin, you’ll launch the Registry Editor by typing Regedit.exe in the Run dialog box. Once the Registry Editor is up and running, navigate through the following subkeys:

  • HKEY_CURRENT_USER
  • Software
  • Microsoft
  • Windows
  • CurrentVersion
  • Applets
Now, right-click the Applets key and select New | Key. Name the new key Defrag. Next, right-click the newly created Defrag key and select New | String and name it Settings. At this point, double-click the Default value inside the Settings key and change the value to YES. To complete the operation, close the Registry Editor and restart Windows 98. Once Windows 98 restarts, you will be able to run Disk Defragmenter without worrying about interference caused by the screen saver.

The solution: An overview
Working with this theory in mind, I discovered this solution to the problem of the never-ending defrag operation. To begin, disable virtual memory completely. Then use the hidden tool to configure Windows 98 to automatically run Disk Defragmenter on startup, but before the operating system is completely initialized. Once Disk Defragmenter completely defragments the hard disk, all the empty space is at the end of the disk. You then reenable virtual memory, which forces Windows to put the swap file at the very end of the hard disk. Here are directions on all of these steps.

Disabling virtual memory
Disabling virtual memory is a relatively simple operation. To begin, open Control Panel and double-click on the System icon. Then, select the Performance tab and click the Virtual Memory button near the bottom of the tab. At this point, you’ll see the Virtual Memory dialog box shown in Figure B.

Figure B: The Virtual Memory dialog box allows you to alter the swap file.

Next, select the Let Me Specify My Own Virtual Memory Settings option. When you do, you’ll see that the settings below it become active, as shown in Figure C.

Figure C: When you select the Let Me Specify My Own Virtual Memory Settings option, the settings are enabled.

Now, select the Disable Virtual Memory check box. To complete the operation, click OK to close the Virtual Memory dialog box. As soon as you do, you’ll see the Confirm Virtual Memory Settings dialog box, as shown in Figure D.

Figure D: You’ll be prompted to confirm the change you made to the virtual memory settings.


 Previous 1 2 3 Next 

WORTHWHILE?

0

0 votes
Save to my library  Save to My Library  
Blog

Talkback 3 comments

Any suggestions on where I can go to download defrag.inf? I am unable to locate the CD that you speck of...and I have been unable to find a downloadable version. Regardless, thanks for your article.
Posted by anonymous on Monday, April 11 2005 03:30 AM

When I set up to run the disk defrag the pause button is on and the system is frozen and will not activate. Any suggestions how to fix?
thanks.
Posted by joe pare on Wednesday, May 04 2005 04:10 AM

You don't need the defrag.inf file. You can use the defrag.exe file in the windows driectory, and create the registry key yourself. In the registry editor, go to the LOCALMACHINE/SOFTWARE/MICROSOFT/WINDOWS/CURRENTVERSION/RUNSERVICEONCE folder. Then enter your own string by right clicking in the right hand window, selecting new - string. Double click on the string you just created and enter C:WINDOWS/DEFRAG.EXE as the value for that string. Then exit the registry and restart your computer. The defragmentation software will come up before you log in. Don't forget to do the vitual memory shut down outlined in this article. It all worked for me.
Posted by Corrie Block on Thursday, December 22 2005 08:51 PM

Windows Server 2008 iSCSI multiple connected session modes

Enterprise Servers & Storage

For administrators using Windows Server 2008's iSCSI initiator, selecting the right connection policy is critical. Rick Vanover explains the options for the ease-of-entry storage protocol.


Read more »


NUS Enterprise: An 'incubator without walls'

Blog thumbnail

Almost everyone has had dreams of owning their own shop, but most of us know also that it takes a fair amount of resources to open a new business, and..... by Eileen Yu

Read more »

Tech Jobs Now!

 
Virtualize your way to cost savings
Build an infrastructure that is flexible, scalable, and economical, as you strive to become a truly agile business.

Red Hat Outlines Its Virtualization Strategy and Roadmap for 2009
» Watch the video




Tags

  1. antivirus
  2. apple ipod
  3. cnet networks inc.
  4. desktop
  5. e - mail
  6. hard drive
  7. intuit inc.
  8. mcafee inc.
  9. microsoft corp.
  10. microsoft windows
  11. microsoft windows vista
  12. microsoft windows xp
  13. norton co.
  14. pc
  15. performance
  16. security
  17. software
  18. tool
  19. web
  20. web site