Solved

script/bat to run chkdsk once and restart

Posted on 2006-11-20
9
1,008 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
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 80 total points
ID: 17984314
Oh, that's for safety sake...you can echo the answer to force it...

echo y|chkdsk c: /x
0
 
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
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

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 20 total points
ID: 17986732
Yes, in the Application Event log under Source=Winlogon and EventID=1001

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
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…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

910 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now