Solved

script/bat to run chkdsk once and restart

Posted on 2006-11-20
9
1,013 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 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
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

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

0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Issue: Unstable cursor in Windows XP and Windows runs extremely slow in that any click will bring up the Hour glass (sometimes for several seconds before giving you what you want) . Troubleshooting Process and the FINAL FIX: This issue see…
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…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

630 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