PTMX2's reply to John, inserted in the text of John's last message:
:
I hope you have reliable a backup of your precious files, if you are to
the point where your disk and file system have to be constantly fixed by
Chkdsk to run properly you may need it, maybe sooner than later!
Instead of stretching your luck with Chkdsk you should be doing tests on
your hard drive and making preparations for a disk replacement.
[ptmx2: First of all, allow me to say you are a craftsman, sir! Thank you...
You provided a way to give me exactly what I asked for in my original post. I
do understand your comment above. I explained the reason for my practice to
in my original post. I also understand why you might urge any reader to be
careful and mindful with a computer 'problem', as they are a sign of well, a
'problem'. Fortunately, I am not one to ignore such things however; many
folks are. Also, if one takes another's advice, he does so with full self
responsibility. I will say as a non-pro self taught computer user it appears
to me that most problems start out as operating and/or application system
errors and/or conflicts that are haphazardly and repeatedly ignored by the
user. That user is simply asking for trouble... Ignoring existing problems
Guarantees that they will only get worse !! - end]
From the onset it should be noted that the startup disk check tool is
Autochk.exe, this native NT application is designed to check the disk
without the support of the Win32 subsystem, otherwise it does the same
thing as Chkdsk. There are two ways to have Chkdsk run when the
computer starts, Autochk will run if you schedule it to run or by
default it will run if the volume's dirty bit is set. If the operating
system detects problems it will automatically set the dirty bit and the
volume will be checked at the next startup. The dirty bit can also be
set manually but it is best not to do this and to leave the setting of
the dirty bit to the operating system. Once set the dirty bit cannot be
changed and while the boot time check can be skipped it cannot be
canceled, on the other hand, a scheduled Chkdsk without the dirty bit
can be canceled at any time.
To schedule a Chkdsk at the next reboot:
On the Windows volume, assumes the volume is C:
At the command prompt issue:
chkdsk c: /f
Chkdsk will return a message telling you that it cannot lock or dismount
the volume and ask you if you want to schedule a Chkdsk at the next
restart, answer Yes.
For dismountable data volumes, assumes the volume is D:
Open a file on the volume, or explore the volume with Explorer. Then at
the Command prompt issue:
chkdsk d: /f
Chkdsk will inform you that the volume is being used by another process
and it will ask you if you want to force a dismount on the volume,
answer No. Chkdsk will then ask you if you want to schedule a Chkdsk at
the next restart, answer Yes.
Now the drives are scheduled to run at the next restart. To do this in
a semi-automated manner, after doing the above:
Using Regedit export the
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager] key.
This exported file will be fairly large, edit the saved file and
remove/delete everything except the BootExecute value, the edited file
will look like this:
==========================================================
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager]
"BootExecute"=hex(7):61,00,75,00,74,00,6f,00,63,00,68,00,65,00,63,00,6b,00,20,
........ with a long series of numbers.
=====================================================
(Leave a blank line at the end of the file.) You only want to save the
BootExecute value, nothing else!
Save the edited .reg file, and when you want to schedule the Chkdsk, merge the
edited .reg file in to the registry.
[ptmx2: since i do not know how to write scripts and i have forgotten how to
write batch files, i originally placed the edited .reg file in the Startup
folder under my user profile. - end]
You can use any of the common methods to automatically merge the file when
the computer boots, you can use a Startup or Logon script, put the file, a
.bat file or a shortcut in the
Startup folder. Use the silent switch to suppress the confirmation request,
a shortcut's typical target could be:
%windir%\regedit.exe /s "c:\Path to BootChk.reg"
To cancel all scheduled Chkdsk at the command prompt issue"
chkntfs /d
[ptmx2: may i add that running chkntfs /d before starting the process above
might be also be beneficial. Just to start off with a clean slate so to
speak. - end]
John
[ptmx2: the shortcut was a Very nice finishing touch. I choose to remove and
move the 'edited' .reg file from my Startup folder and to keep the shortcut
handy by placing it on my desktop. Now I am just one click away whenever I
want this task to run. Thank you again for your willingness to take on this
issue and the excellent "advice" provided. - end]
==================================================