Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

script/bat to run chkdsk once and restart

Posted on 2006-11-20
9
Medium Priority
?
1,014 Views
Last Modified: 2012-05-05
Hi,

I'd like to have chkdsk run on a computer without any user interaction.

I'd like to run chkdsk to fix all errors on the c: drive.
Then I'd like to restart the comptuer and have the chkdsk run.
Then I'd like windows to start up.

Any suggestions how I can do this?

I think what I'm looking for is a registry edit that I can schedule a chkdsk/autochk to run only ONCE during the next startup. then I can create a reboot at a certain time.

thanks!
0
Comment
Question by:vITComputing
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
9 Comments
 
LVL 67

Expert Comment

by:sirbounty
ID: 17984286
I don't think you need a batch/script - that's how chkdsk works, since it can't lock the c drive...

Try it with:

chkdsk c: /x

There is a shtudown.exe that will allow you to schedule the reboot...
0
 

Author Comment

by:vITComputing
ID: 17984293
That still requires user interaction of y/n.

I am aware of the shutdown.exe, and I do plan on using that as soon as I can schedule a chkdsk/autochk to run ONCE during startup.

Thanks.
0
 
LVL 67

Accepted Solution

by:
sirbounty earned 320 total points
ID: 17984314
Oh, that's for safety sake...you can echo the answer to force it...

echo y|chkdsk c: /x
0
Does Your Cloud Backup Use Blockchain Technology?

Blockchain technology has already revolutionized finance thanks to Bitcoin. Now it's disrupting other areas, including the realm of data protection. Learn how blockchain is now being used to authenticate backup files and keep them safe from hackers.

 
LVL 8

Expert Comment

by:saw830
ID: 17984345
Hi vITComputing,

is this of any assistance?
http://support.microsoft.com/kb/218461

Hope this helps,
Alan
0
 

Author Comment

by:vITComputing
ID: 17984358
the echo command worked.  What the difference between the /f and the /x parameter?

Thanks!
0
 

Author Comment

by:vITComputing
ID: 17984370
Does the chkdsk also write to a log file somewhere or maybe the event log?

Thanks
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 17984384
/x forces a volume dismount and implies /f
0
 
LVL 67

Expert Comment

by:sirbounty
ID: 17984386
Yes - eventlog
0
 
LVL 32

Assisted Solution

by:and235100
and235100 earned 80 total points
ID: 17986732
Yes, in the Application Event log under Source=Winlogon and EventID=1001

0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have done a reformat of your hard drive and proceeded to do a successful Windows XP installation, you may notice that a choice between two operating systems when you start up the machine. Here is how to get rid of this: Click Start Clic…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question