have a chkdsk run on all drives every time I boot


  1. Posts : 880
    Windows 7 Professional 64bit
       #1

    have a chkdsk run on all drives every time I boot


    My W7 PC is in "Hibernate" most of the time and I rarely restart it. I would like to do what most people are trying to avoid: I would LIKE TO have a chkdsk run on all drives every time I boot. Is there an easy way to do this? Further, might there be any way to distinguish between "this chkdsk is being run because you want it run every time" vs. "the chkdsk is being run because the dirty bit is set (you had a problem)"?
      My Computer


  2. Posts : 543
    Windows 7 Ultimate x64
       #2

    Hello,

    How strange. If you open cmd and type the following then it should mark the partition as dirty and start up with a chkdsk:

    "fsutil dirty set C:"

    (Put any other drives you want on the end as well). It maybe worth adding it as a scheduled task. There wont be a way to distinguish because you will be doing it every time you boot. Bare in mind that if you have lots of data then it could take a lot of time to check. Using Hibernated files isnt a great idea really.


    Dave
      My Computer


  3. Posts : 5,092
    Windows 7 32 bit
       #3

    You could try making a batch file like MyChikDsk.cmd and put your chkdsk commands in it. To test it, make a shortcut to the .cmd file and put it in the RunOnce registry key using my RunItOnce utility available on this page:

    Faves Downloads


    All my apps are free to use at your own risk. See Requirement heading at the top of the page.

    Using this technique has worked for me deleting index.dat files otherwise protected by the system. I haven't tried it with chkdsk. But I know RunOnce key stuff is run before the system is fully engaged, which is why some malware exploit it. I would try it on a non system drive first to see how it goes.

    If it works then you just need to devise a way to set the .cmd file to run under RunOnce key every time. A small AutoIt3 program to write the key should be pretty easy to do. A few lines.

    edit: if this technique works and you don't need to set the dirty bit then you should be able to tell during boot what it up.
      My Computer


  4. Posts : 880
    Windows 7 Professional 64bit
    Thread Starter
       #4

    Thanks, I thought if there was a "trivially easy" way to do this then someone here would know. I will try doing it "the hard way" instead.
      My Computer


  5. Posts : 5,092
    Windows 7 32 bit
       #5
      My Computer


  6. Posts : 880
    Windows 7 Professional 64bit
    Thread Starter
       #6

    That looks like it might do what I want, but in any case is a very nice find--thank you MA!
      My Computer


  7. Posts : 5,092
    Windows 7 32 bit
       #7

    maxseven said:
    That looks like it might do what I want, but in any case is a very nice find--thank you MA!
    You are welcome. Thanks for the rep. :)
      My Computer


  8. Posts : 53,363
    Windows 10 Home x64
       #8

    I have this as well, but have never had need for it :)

    Download Portable CheckDiskGUI 1.1.3 Free - Graphical User Interface for the commandline version of chkdsk.exe - Softpedia

    Some other interesting software from this author

    http://www.wieldraaijer.nl/

    A Guy
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 12:30.
Find Us