have a chkdsk run on all drives every time I boot

maxseven

Active member
Guru
VIP
Local time
6:00 AM
Messages
930
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 My Computer

At a glance

Windows 7 Professional 64bitIntel Core i7 4600M @ 2.90GHz16.0GB Dual-Channel DDR3 @ 797MHz (11-11-11-28)Intel HD Graphics 4600 (Dell) 2048MB ATI AMD ...
Computer type
Laptop
Computer Manufacturer/Model Number
Dell Latitude E6540 Laptop
OS
Windows 7 Professional 64bit
CPU
Intel Core i7 4600M @ 2.90GHz
Motherboard
Dell Inc. 0CYT5F (SOCKET 0)
Memory
16.0GB Dual-Channel DDR3 @ 797MHz (11-11-11-28)
Graphics Card(s)
Intel HD Graphics 4600 (Dell) 2048MB ATI AMD Radeon HD 8790M
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
HP ZR30w (2560x1600@60Hz)
Hard Drives
256GB LITEONIT LMT-256M6M-41 mm SATA (SSD)
1TB Samsung SSD 860 EVO mSATA SATA (SSD)
2TB USB 3.0 USB Device
115GB SanDisk Ultra Fit USB
Other Info
Multiple Dell E-Port Plus II Port Replicator/Docking Stations 0Y72NH USB 3.0 + 130W AC Adapters
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 My Computer

At a glance

Windows 7 Ultimate x64Intel Core i7 2600K (O/C 4.7GHz)8GB Corsair Vengeance LP, DDR3, 1600MhzNvidia GTX 460 Graphics Card
Computer type
PC/Desktop
Computer Manufacturer/Model Number
Custom
OS
Windows 7 Ultimate x64
CPU
Intel Core i7 2600K (O/C 4.7GHz)
Motherboard
Asus ROG Maximus IV Extreme-Z - Intel Z68 Chipset
Memory
8GB Corsair Vengeance LP, DDR3, 1600Mhz
Graphics Card(s)
Nvidia GTX 460 Graphics Card
Sound Card
Onboard
Monitor(s) Displays
Dell E228WFP
Hard Drives
2 x 500GB Samsung SpinPoint Drives (1 for OS, 1 for Data and Apps)
PSU
CoolerMaster 1000W
Case
CoolerMaster HAF
Cooling
Air
Internet Speed
Fibre - 60MB Down, 30MB Up
Antivirus
ESET NOD32 Antivirus
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 My Computer

At a glance

Windows 7 32 bitAMD 5200+ dual core2 GBNVidia GeForce 6150SE 128 MB
Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.
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 My Computer

At a glance

Windows 7 Professional 64bitIntel Core i7 4600M @ 2.90GHz16.0GB Dual-Channel DDR3 @ 797MHz (11-11-11-28)Intel HD Graphics 4600 (Dell) 2048MB ATI AMD ...
Computer type
Laptop
Computer Manufacturer/Model Number
Dell Latitude E6540 Laptop
OS
Windows 7 Professional 64bit
CPU
Intel Core i7 4600M @ 2.90GHz
Motherboard
Dell Inc. 0CYT5F (SOCKET 0)
Memory
16.0GB Dual-Channel DDR3 @ 797MHz (11-11-11-28)
Graphics Card(s)
Intel HD Graphics 4600 (Dell) 2048MB ATI AMD Radeon HD 8790M
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
HP ZR30w (2560x1600@60Hz)
Hard Drives
256GB LITEONIT LMT-256M6M-41 mm SATA (SSD)
1TB Samsung SSD 860 EVO mSATA SATA (SSD)
2TB USB 3.0 USB Device
115GB SanDisk Ultra Fit USB
Other Info
Multiple Dell E-Port Plus II Port Replicator/Docking Stations 0Y72NH USB 3.0 + 130W AC Adapters

My Computer My Computer

At a glance

Windows 7 32 bitAMD 5200+ dual core2 GBNVidia GeForce 6150SE 128 MB
Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.

My Computer My Computer

At a glance

Windows 7 Professional 64bitIntel Core i7 4600M @ 2.90GHz16.0GB Dual-Channel DDR3 @ 797MHz (11-11-11-28)Intel HD Graphics 4600 (Dell) 2048MB ATI AMD ...
Computer type
Laptop
Computer Manufacturer/Model Number
Dell Latitude E6540 Laptop
OS
Windows 7 Professional 64bit
CPU
Intel Core i7 4600M @ 2.90GHz
Motherboard
Dell Inc. 0CYT5F (SOCKET 0)
Memory
16.0GB Dual-Channel DDR3 @ 797MHz (11-11-11-28)
Graphics Card(s)
Intel HD Graphics 4600 (Dell) 2048MB ATI AMD Radeon HD 8790M
Sound Card
Realtek High Definition Audio
Monitor(s) Displays
HP ZR30w (2560x1600@60Hz)
Hard Drives
256GB LITEONIT LMT-256M6M-41 mm SATA (SSD)
1TB Samsung SSD 860 EVO mSATA SATA (SSD)
2TB USB 3.0 USB Device
115GB SanDisk Ultra Fit USB
Other Info
Multiple Dell E-Port Plus II Port Replicator/Docking Stations 0Y72NH USB 3.0 + 130W AC Adapters

My Computer My Computer

At a glance

Windows 7 32 bitAMD 5200+ dual core2 GBNVidia GeForce 6150SE 128 MB
Computer Manufacturer/Model Number
HP Media Center
OS
Windows 7 32 bit
CPU
AMD 5200+ dual core
Memory
2 GB
Graphics Card(s)
NVidia GeForce 6150SE 128 MB
Monitor(s) Displays
CRT
Screen Resolution
1280x1024
Hard Drives
500 GB Sata internal :

SIIG USB 3.0 docking stations w/WD Caviar Black 6 Gb/s drives
Keyboard
PS/2
Mouse
PS/2 Wheel Mouse
Other Info
SIIG USB 3.0 PCIexpress card.

My Computer My Computer

At a glance

Windows 10 Home x64INTEL Core i5-750 Quad-Core 3.37GHzHyperX Fury Black Series 8GB (2 x 4GB) 1866MhzEVGA GeForce GTX 750 Superclocked 1GB 128-Bit...
Computer type
PC/Desktop
OS
Windows 10 Home x64
CPU
INTEL Core i5-750 Quad-Core 3.37GHz
Motherboard
ASUS P7P55D
Memory
HyperX Fury Black Series 8GB (2 x 4GB) 1866Mhz
Graphics Card(s)
EVGA GeForce GTX 750 Superclocked 1GB 128-Bit GDDR5
Monitor(s) Displays
LG 32MA68HY 32" IPS
Screen Resolution
1920 x 1080
Hard Drives
Samsung 840 Evo 120GB, SEAGATE 500GB Barracuda® 7200.12, SATA 3 Gb/s, 7200 RPM, 16MB cache
PSU
ANTEC TruePower New TP-550, 80 PLUS, 550W
Case
ANTEC Three Hundred Illusion
Cooling
COOLER MASTER Hyper 212 Plus, 4 x 120mm 1 x 140mm Noctua's
Internet Speed
85 + Mbps
Antivirus
Avast
Browser
Vivaldi
Back
Top