Defrag from Scheduled tasks

  • Thread starter Thread starter Doug Watt
  • Start date Start date
D

Doug Watt

I want to run defrag from my scheluled tasks but it brings
the program up but it doesn't start running. Is there
something else I need to do?
 
Browse to Defrag.exe . You are scheduling defrag.msc. There are two defrag program. See help.
 
Doug said:
I want to run defrag from my scheluled tasks but it brings the program up
but it doesn't start running. Is there something else I need to do?

Hi Doug,

What operating system?

Bill
 
I had the same question! I tried to find defrag.exe but
to no avail (this is on a Win2k Srv). There is a
dfrgntfs.exe but when I try to run it I get that "command
line operation of disk defragmenter is not supported".
Any other ideas?

thanks
christos

-----Original Message-----
Browse to Defrag.exe . You are scheduling defrag.msc.
There are two defrag program. See help.
--
--------------------------------------------------------- -
'Not happy John! Defending our democracy',
http://www.smh.com.au/articles/2004/06/29/1088392635123.h tml

"Doug Watt" <[email protected]> wrote
in message news:[email protected]...
 
The standard defrag does not support scheduled operation...however, using
vbscript, you can start the app and use sendkeys to start a defrag..

Cheers,
Stu
 
This won't help on Win2K, but with Win2K3 MS made available WMIC and
issuing the following command will result in a command line schedulable
defrag. As was posted earlier WMI VBS scripts can do it too, but from my
readings automation of defrags via WMIC or WMI is only supported on
Win2K3

wmic volume where driveletter="c:" call defrag

change the drive letter to match any drives you want to defrag (replace
defraganalysis if you want to get an analysis first)
 
Nunayadam said:
This won't help on Win2K, but with Win2K3 MS made available WMIC and
issuing the following command will result in a command line schedulable
defrag. As was posted earlier WMI VBS scripts can do it too, but from my
readings automation of defrags via WMIC or WMI is only supported on
Win2K3

wmic volume where driveletter="c:" call defrag

Why not just

defrag c: -f -v

Why bother with going through WMIC?

Bill
 
Back
Top