Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running CHKDSK after power failure.

Status
Not open for further replies.

WowWhoaWeeWa

Technical User
Oct 21, 2010
1
US
Hi Everyone,

I have a box that will be used for digital signage. The location where the box will be installed will not have any office staff. It's like a stand alone kiosk where viewers of the digital signage check times for a departure. I need to set up this box so that no user intervention is required should there be a power failure. In the event of the power failure, I need CHKDSK to run. Typically, CHKDSK asks two questions about allowing the CHKDSK process to begin at next reboot. I need to automate this.

I know that using "echo Y>file.xxx" will store keystrokes. I know that I need to use some kind of "for/do" statement with "chkdsk%%f /f<file.xxx" but i can't seem to have the PC execute it correctly. I think the issue remains with my commands.

Additionally, I need to disable the option to enter repair mode should the power fail during a boot up.

Any help would be greatly appreciated!

Howard

 
Is the only time this machine is rebooted is when there is a power failure?

Otherwise what type of batch file is going to run, say at Startup, and be able to differentiate between a power failure or normal boot?

If you can get over that dilemma then maybe something along these lines might??? be able to do something?

AutoIt-- Freeware:

AutoHotkey

Vbscript Forum.
 
I would suggest using a semaphore file to control the actions. During startup read the file contents to see if it reads "shutdown" which would have been written to it during a normal shutdown. During startup the word "startup" would normally be written. As you can see if there was a power outage then "shutdown" would not have been written. When this is found, run the chkdsk c: -r.

It wouldn't take much to write such a program, actually it may possibly be done using batch or maybe even the Windows schedualer program.

Regards,
David.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top