1.

Solve : Combine Check Disk and Defrag into one Bat file, and get no error messages?

Answer» <html><body><p>I've been getting these error <a href="https://interviewquestions.tuteehub.com/tag/messages-25598" style="font-weight:bold;" target="_blank" title="Click to know more about MESSAGES">MESSAGES</a>, using Scheduled Tasks to do Check Disk and Defrag on my two <a href="https://interviewquestions.tuteehub.com/tag/hard-1015537" style="font-weight:bold;" target="_blank" title="Click to know more about HARD">HARD</a> drives:<br/><br/>5/18/10 it did not Defrag C:, got exit code of 0x6<br/><br/>9/21/10 It did not Check Disk D:, cannot lock current drive, volume dismounted, all opened handles to this volume are now invalid<br/><br/>I think I just need to disable some services, then it will work.  Everything I've figured out is here, I think I'm close:<br/><br/><a href="http://www.codeproject.com/Questions/117564/&lt;klux&gt;DOS&lt;/klux&gt;-commmands-to-disable-re-enable-non-MS-Services.aspx?display=Print">http://www.codeproject.com/Questions/117564/DOS-commmands-to-disable-re-enable-non-MS-Services.aspx?display=Print</a><br/><br/>This is what I have that needs to be modified somehow.  The code just flashes on the screen.  Thank you for your input.<br/><br/>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++<br/><br/>sc config avg9wd start= disabled<br/>sc config CTAudSvcService start= disabled<br/>sc config nvsvc start= disabled<br/><br/>ECHO y|CHKDSK D: /X/R<br/>ECHO y|CHKDSK C: /R<br/><br/>C:\WINDOWS\system32\defrag.exe d: -v&gt;"c:\Documents and Settings\Administrator\Desktop\defrag d.txt"<br/>C:\WINDOWS\system32\defrag.exe c: -v&gt;"c:\Documents and Settings\Administrator\Desktop\defrag c.txt"<br/><br/>sc config avg9wd start= auto<br/>sc config CTAudSvcService start= auto<br/>sc config nvsvc start= auto<br/><br/>SHUTDOWN -rI <a href="https://interviewquestions.tuteehub.com/tag/put-11868" style="font-weight:bold;" target="_blank" title="Click to know more about PUT">PUT</a> my conclusion here at the bottom of this page.<br/><br/><a href="http://www.codeproject.com/Questions/117564/DOS-commmands-to-disable-re-enable-non-MS-Services.aspx">http://www.codeproject.com/Questions/117564/DOS-commmands-to-disable-re-enable-non-MS-Services.aspx</a><br/><br/>It does not appear to me that a DOS command can disable some Services<br/><br/>******************************************************************<br/><br/>Control Panel \ Network Connections \ [right-click] Local Area Connection 5 \ Disable<br/><br/>Start \ Run \ msconfig \<br/>Services tab \ [check] Hide All Microsoft Services \ Disable All \ Apply<br/>Startup tab \ Disable All \ Apply<br/>Close \ Restart<br/><br/>Then let Scheduled Tasks run the following bat file at 1:00 AM, on the third Tuesday of every month, view the <a href="https://interviewquestions.tuteehub.com/tag/results-2643" style="font-weight:bold;" target="_blank" title="Click to know more about RESULTS">RESULTS</a> in the AM.<br/><br/>--------------------------------------------------------<br/><br/>C:\WINDOWS\system32\defrag.exe c: -v&gt;"c:\Documents and Settings\Administrator\Desktop\defrag c.txt"<br/>C:\WINDOWS\system32\defrag.exe d: -v&gt;"c:\Documents and Settings\Administrator\Desktop\defrag d.txt"<br/><br/>ECHO y|CHKDSK C: /R<br/>ECHO y|CHKDSK D: /X/R<br/><br/>SHUTDOWN -r</p></body></html>


Discussion

No Comment Found