I run maintenance for a lot of offices and use chkdsk as a part of the maintenance. I've recently been using PSEXEC to start a batch file that simply runs chkdsk and then pauses to keep the command prompt window open so that I can check to see if there were any errors found.
I would like to automate the process a little more.
I read somewhere (sorry my browser is not letting me cut and paste the link to the TechNet article) that chkdsk has exit codes that can be used to determine if any errors were found or not.
My problem is that I do not know where to begin in making use of these error codes? Could anyone shed some light or point me in the right direction on what I need to learn so that I can make a batch file or script that can run the chkdsk and then perform another action depending on the exit code?