Running Chkdsk using Bigfix and other maintenace tasks for Windoze

(imported topic written by geeksikh91)

I have searched and not found anyone using Bigfix relevance to run CHKDSK on local drives. Could someone please assist with what it would take to write a relevance for it.

Issue is when you attempt to run CHKDSK C: /F on command prompt it will prompt you to schedule it at next reboot since the drive is in use. See below:

C:>chkdsk c: /f

The type of the file system is NTFS.

Cannot lock current drive.

Chkdsk cannot run because the volume is in use by another

process. Would you like to schedule this volume to be

checked the next time the system restarts? (Y/N) y

This volume will be checked the next time the system restarts.

So how would I supply the prompt Y so it can be scheduled?

Along the same lines I would be interested to hear if other customers are using Bigfix for regular maintenance on their workstations (things like clearing TMP files etc.) and if so what other steps are they taking as this would provide a boost to workstation performance.

(imported comment written by NoahSalzman)

http://support.microsoft.com/kb/197527

(imported comment written by geeksikh91)

Thanks Noah for the link. That is very helpful.

Outside of Chkdsk does anyone run any tasks for regular maintenance on workstations like clearing TMP files etc.

(imported comment written by SystemAdmin)

We use tasks for lots of “maintenance” items. In some cases we also use Bigfix tasks to schedule and maintain local Windows scheduled tasks.

Another way to schedule chkdsk. We use this successfully on thousands of machines in our environment.

delete c:\temp\y.txt

delete __appendfile

appendfile y

copy __appendfile c:\temp\y.txt

dos chkdsk c: /f /r < c:\temp\y.txt

if {}

delete c:\temp\n.txt

delete __appendfile

appendfile n

appendfile y

copy __appendfile c:\temp\n.txt

dos chkdsk : /f /r < c:\temp\n.txt

endif

(imported comment written by geeksikh91)

Thanks Jon for the relevance.

(imported comment written by cstoneba)

If I were doing it, I would have it run when no user is logged in, so make it relevant when no user is logged in (not exists current user).

(imported comment written by SystemAdmin)

All this action is doing is setting the flag to run chkdsk on next boot, not running it immediately. So the existance of a logged on user is probably irrelevant.

Also note, there are various command options for chkdsk. They vary slightly by OS type. Test, test, test.

The chkdsk process usually generates ID 1001 in the app log. Doing an analysis of those event log entries can yield lots of info such as allocation errors, bad sectors, and more.