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.
Windows XP

Avatar of undefined
Last Comment
Eagle6990

8/22/2022 - Mon
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
Eagle6990

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
ShaunBarney

ASKER
Eagle6990,

Thanks for the answer, and the script.

SB
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?
Experts Exchange has (a) saved my job multiple times, (b) saved me hours, days, and even weeks of work, and often (c) makes me look like a superhero! This place is MAGIC!
Walt Forbes
Eagle6990

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