Link to home
Start Free TrialLog in
Avatar of ShaunBarney
ShaunBarney

asked on

How To Schedule Graphical GUI Defrag dfrg.msc

How would I schedule the graphical GUI Defrag program in Windows XP.  The file is located in:

%SystemRoot%\System32\dfrg.msc

I know how to schedule the defrag.exe program but was wondering if there was a way to do it with the dfrg.msc.  Are there any / or - commandsto use?? Example:

%SystemRoot%\System32\dfrg.msc /f

%SystemRoot%\System32\dfrg.msc -f

When I schedule it with no / or - commands the defrag program starts but the defrag does not begin "defraging" it just sits there.
Avatar of stevenlewis
stevenlewis

Not sure about XP, but with other versions of MS, you needed a third party defrager to be able to schdule (and have it run) a defrag, as you found out, it will launch the defrag, but won't run it
ASKER CERTIFIED SOLUTION
Avatar of Eagle6990
Eagle6990
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ShaunBarney

ASKER

Eagle6990,

Thanks for the answer, and the script.

SB
Avatar of Enrique G Dutra
I Have a question about it, if i want to run an analyze with this script and then save de log report, i can?
What have i to write to do that?
I don't have XP available to me right now, but on Windows 7 you can do it like this to save the report to C:\Temp\Report.txt

echo Defrag report on %computername% at %date% %time% >> c:\temp\Report.txt
defrag c: /a /v >> c:\Temp\Report.txt