Windows XP takes forever to shut down, always scandisk second partition

Alright.  Running Windows XP Professional with SP1.  No problems during the operation of my system.  I don't crash.  I don't hang.  No problems.

However, when I shut down, everything closes as usual, it saves my settings for about 5-6 mins and then shuts my computer off!!!  It normally does it in 30-40 seconds.

Then when I reboot in the morning or afternoon, or anytime I reboot, it wants to check the disk for errors but it only checks the second partition of the only hard drive in the system.  The dirty bit IS set for this parition however it never seems to clear and it never finds any problems.  I've done tons and tons of searching on the net, these communities with other similar problems but the closest i've come to find an answer is this.  Microsoft has released some patch for this problem for 98 and ME and supposedly XP but noone can remember where to get the XP patch.  I'm tired of spending hours trying to fix this problem and its only come since i've upgraded to SP1 although it was not right after I upgraded.  So 500 points to whoever can fix this the fastest.  I thank you for your time as I'm done wasting mine.
Who is Participating?
Joseph NyaemaConnect With a Mentor IT ConsultantCommented:
Configure the machine not to clear the pagefile when it shuts down.

You'll need to edit the registry

Start-> Run
Expand HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management
If the value ClearPageFileAtShutdown does not exist, from the Edit menu select New - DWORD value and enter a name of ClearPageFileAtShutdown
Double click on ClearPageFileAtShutdown and set it to 0

Reboot the machine and next time you shutdown the pagefile will not be cleared
Hi Niagol,

have you tried the option start->run->shutdown -f

NiagolAuthor Commented:
In trying to shut down faster?  No.. I'd like to beable to just click shutdown when i'm ready to sleep.  And my real problem is in regards to the fact that I scandisk every single boot.  I provided the shutdown information as I believe it may have some significance although I have no knowledge of how to check what is taking so long.
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

NiagolAuthor Commented:
Thank you for the links to all the great hard drive companies.  I did download the WD Diagnositic and run the testing.  All is good with my hard drive.  Might I note that the problem is only with the 2nd partition of the hard drive.  It never has a problem with C which is what it boots off.

Perhaps someone out there knows how to unset the dirty bit?  Or of this elusive patch for XP that know one can remember where to get?
try booting/shutting down in safe mode then tell us if it shuts down properly
To skip windows from checking a drive with the dirty bit set you should run any time before shutdown (maybe in a batch file on start up):

chkntfs /x d:

This skips the auto disk check (if dirty bit is set) on drive d. This is not always recommended as sometimes corruption does occur, so once every other week or so it might be smart to run:

chkntfs /D  (this restores the default settings)

(feel free to ignore the rest of my ranting....)
I think your real problem is the shutdown issue: Windows does not know how to shut down your computer properly, and that is why it sets the 'dirty' flag on the partition. You should check the Application and System Logs in Event Viewer in the computer managment console to see if you can figure out why the computer isn't shutting down correctly. It could be a problem with device drivers, network traffic, or just a random program that is refusing to shut down correctly. Frequently the fastest way to fix these problems is to reinstall windows.
I have run into this problem on about 8 computers on the network.  To correct it, I've installed a program called UPHClean.exe this program is offered free from Microsoft.  What is happening is that a program or service (maybee even driver) is not releasing he registry, causing the pc to take a long time logging off.  UPHClean forces that service, driver or application to realease the registry.  To Download and read more, please go here:

Have you tried reformatting that partition? Remember format is distructive so backup your data there first.
it sounds to like a memory leak (some program is not shutting down) so it's doing the scandisk like an improper shut down was done.

is a free quick shut down program
NiagolAuthor Commented:
Alright.. I've checked the logs and cannot find anything not shutting down correctly.  As for the scandisk this is what it comes up with anytime I let it scan.  Pulled from a Winlogon source:
Checking file system on E:
The type of the file system is NTFS.

One of your disks needs to be checked for consistency. You
may cancel the disk check, but it is strongly recommended
that you continue.
Windows will now check the disk.                        
Cleaning up 1 unused index entries from index $SII of file 0x9.
Cleaning up 1 unused index entries from index $SDH of file 0x9.
Cleaning up 1 unused security descriptors.

I will be checking a the programs listed above to check to solve the shutdown problem however the dirty bit is set always.  So even if I fix that it will still scan disk.  Is there a way to unset that bit?
NiagolAuthor Commented:
The two programs listed do not work in solving this problem.  I've even tried moving my page file from the E drive back to the C drive but to no aval either.  I cannot seem to find a way to see what is going on.  Event viewer successfully shuts down in its own event list but nothing else is "running" according to it.  A complete FULL scan on the hard drive shows no errors, no bad blocks, nothing.  I have no programs on my E drive just data.  The only thing left on the E drive that is accessed by the system is that I have my "My Documents" folder relocated to E however its been like this for quite some time now so it doesn't make sense to just start doing that all of a sudden.  I did reboot in safe mode as was asked and it took me almost a full 40 mins to get back into my computer as it took twice as long to start up and shut down.  I'll go back to what I'm really looking for.  Is there a way to unset the dirty bit OR a way to find out what/why its being set?  Thank you for your continued brain bending.
ezraaConnect With a Mentor Commented:
did you try running:

chkntfs /x e:

before restarting?
NiagolAuthor Commented:
You guys are awesome.  Ezraa sorry I didn't see your suggestion above.  It did not help the shutdown and only shut off the check.  The dirty bit is still set which to me is like sweeping the problem under the rug.  Nyaema the system now shuts down faster than it used to!  Awesome help.  If anybody knows how to unset a dirty bit that would be wonderful but as for now I just rebooted 5 times trying this and it only took me 30mins total time including use!!!  Thanks ALOT to you all.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.