• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 411
  • Last Modified:

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!
0
OAC Technology
Asked:
OAC Technology
  • 3
  • 2
  • 2
  • +2
1 Solution
 
John HurstBusiness 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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
 
John HurstBusiness 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
 
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

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now