View Full Version : Task Scheduler
John
April 16th 03, 08:14 PM
How come in Windows 98 one can set the Disc Clean up or
Disc Defragmentor to run over night and the Task
Scheduler will not have a problem, but in Windows XP, it
needs the user to select which drive to defrag or clean
up. This seems to make the scheduling aspect almost
pointless because it will not proceed until a drive is
selected? I schedule the task to preform during the
night when nobody is around. Any help would be great!!!!
Mark L. Ferguson
April 16th 03, 08:29 PM
I run a script to do it
--defragNchkdsk.vbs--
set shell = CreateObject("WScript.Shell")
set fso = CreateObject("Scripting.FileSystemObject")
set drives = fso.Drives
For Each drive in drives
if drive.DriveType = 2 then
shell.run "chkdsk.exe " & drive.DriveLetter & ":", 1, true
shell.run "defrag.exe " & drive.DriveLetter & ": /f", 1, true
end if
next
' Msgbox "Done"
' press Ctrl-C to bypass a drive
--cut--
--
Mark L. Ferguson TabletPC MVP
Email address : Subject: "QZ" + anything
All email without "QZ" in the subject line will be automatically deleted.
marfer's notes for XP > http://www.geocities.com/marfer_mvp/xp_notes.htm
..
"John" > wrote in message
...
> How come in Windows 98 one can set the Disc Clean up or
> Disc Defragmentor to run over night and the Task
> Scheduler will not have a problem, but in Windows XP, it
> needs the user to select which drive to defrag or clean
> up. This seems to make the scheduling aspect almost
> pointless because it will not proceed until a drive is
> selected? I schedule the task to preform during the
> night when nobody is around. Any help would be great!!!!
vBulletin® v3.6.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.