Force a ChkDisk on unclean shutdown on Windows 7?

We have hundreds of Windows 7 computers in a retail environment. Retail employees are not computer savvy, and frequently push the power button to hard shut down a machine. (Despite our requests not to)

I was curious if there is a way to automatically force a "ChkDisk /f" on machines which have not been shutdown properly? It would be awesome if it could be done through GPO.

Bonus points if text could be included that said, "Because this computer was not properly shutdown, we are running a check of your system. Please shutdown the computer by using the Start Button > Shutdown in the future."

Windows 95 used to do this back in the day, can it still be done today?

Thank you!
LVL 2
OAC TechnologyProfessional NerdsAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JohnBusiness Consultant (Owner)Commented:
Windows 95 was FAT and modern systems are NTFS. I am not sure you want a system to run CHKDSK and force fixes on an automated basis. You may get a surprise with corrupted files.

I suggest you ask users to (a) watch what they are doing (not asking much) and (b) tell you (technical support team) if Windows gives a message about an unclean shutdown (it will do that).

But you want to be in control of running CHKDSK.
0
OAC TechnologyProfessional NerdsAuthor Commented:
Thank you, yes I do, anyone else?
0
Rob HutchinsonDesktop SupportCommented:
When deploying new computers; open the case, and remove the connector for the power button on the systemboard. You can even do this on all the existing computers if you have the manpower( maybe perform a system cleaning at the same time, add memory too?)...then I guarantee they will not be able to force the computer to shutdown this way.
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Rob HutchinsonDesktop SupportCommented:
As another stop gap to not only prevent the problem described above; but to also protect the operating system software in general along with the other apps...Get the corp version of Deep Freeze, and freeze the computers...the users can then delete whatever they want, force shutdown the computer, delete partitions, whatever they want...reboot the computer, and everything is back to normal. Problem solved.

http://www.faronics.com/products/deep-freeze/enterprise/
0
rindiCommented:
Actually running a chkdsk on a FAT file-system is often destructive, as it has no transaction log which NTFS has, so it was much more dangerous running it under Windows 9x than it is today with more modern OS's and file-systems...

Normally when you press the power button on the PC, it will do a controlled shutdown, at least as long as the button isn't pressed too long, so that should normally not do any harm.
0
JohnBusiness Consultant (Owner)Commented:
Actually running a chkdsk on a FAT file-system is often destructive,  Yes and I did not mean to imply otherwise. But you can do damage on a modern system and that is why I would net let it run unattended or automatically as the result of restart. You should always run non-destructively first and then see if you want to force it at next reboot.
0
nobusCommented:
imo there's no need to run chkdsk everytime; if the disk structure is compromised, chkdsk will be started by windows afaik
0
OAC TechnologyProfessional NerdsAuthor Commented:
Guys...

Can anyone offer a solution to my question? I'm not awarding points for anything other than an answer to the question I asked.

I want to run a chckdisk on an unclean shutdown.  User education doesn't prevent random (and frequent) power outages which occur in this environment.

I don't care about the micro-negatives of blindly running a chkdsk automatically. I know what chkdisk is, I understand what it does, I'm not looking for alternatives. If it reduces the number of format/restores that I have to do because of hosed file systems, I want to do it. I'll say it again - YES! I actually want to do what I asked! :)

So without further distractions, can anyone answer the question that I asked initially?
0
rindiCommented:
Actually windows does this automatically, if it realizes the system wasn't just reset rather than shutdown or rebooted properly, it sets a "dirty bit" on the file-system, and that will cause chkdsk to run at the next bootup. But it only sets this dirty bit if it is necessary. As I mentioned above, pressing the power button causes a controlled shutdown, so that won't cause the bit to be set (unless of course the user presses the button continuously for a couple of seconds, in which case the bit will be set if the file-system corrupts from this action).

With fsutil you can manually set the dirty bit, but I don't see a possibility on how you could automate that, as you won't know if the PC was shut down properly or not, until windows is back up. but the command would be:

fsutil dirty set driveletter:

(from an elevated cmd prompt).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
OAC TechnologyProfessional NerdsAuthor Commented:
rindi, thank you! That points me in the right direction.
0
nobusCommented:
in fact it's exactly the same as i said -
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows 7

From novice to tech pro — start learning today.

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.