View Single Post
  #2  
Old August 20th 12, 03:01 AM posted to microsoft.public.windowsxp.basics,microsoft.public.windowsxp
VanguardLH[_2_]
external usenet poster
 
Posts: 10,881
Default Manually run dfrgntfs.exe?

"Ant" wrote:

I got annoyed with Windows XP Pro. SP3's dfrgntfs.exe that run in the
background after about ten minutes or so of idling. So I disabled it
through TweakUI. I tried to run dfrgntfs.exe, but it said "command line
operation of Disk Defragmenter is not supported." Is this the same disk
defragger through %SystemRoot%\System32\dfrg.msc?


NOTE: Please be considerate and reduce your signature to 4 lines, or
less. Note that spamming in your signature is spamming in your
post. Since signatures are usually off-topic or ego fluff, it's
best to not bother using a signature at all.

As to your problem, I'm assuming in TweakUI that you went under its
General tab and disabled the "Optimize the disk while idle" option. As
I recall, that sets the following registry value:

Key: HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Opt imalLayout]
Data: EnableAutoLayout
Value: 1 (enable defrag when idle)
0 (disable defrag when idle)

Obviously this won't affect any scheduled events in Task Scheduler to
run a defrag at some time, when the host is idle, when you login, or for
whatever triggers the scheduled event. I'm not sure that the above
setting also disables the boot-time optimization or the defragging done
during file indexing. The boot-time optimization is configured at:

Key: HKLM\SOFTWARE\Microsoft\Dfrg\BootOptimizeFunction
Data: Enable
Value: Y (yes), N (no)

Apparently if you let Windows go indexing files, the indexing service
kicks off a defrag. So if you disable automatic loading and running of
the Indexing Service (set it to Manual) then you don't get the
consequential defrag operation.

And, yes, the front ends of defrag UI (%SystemRoot%\system32\dfrg.msc),
defrag.exe, and the Defrag Wizard when you use the Disk Tools all use
dfrgntfs.exe as their working process to do the defragmentation. You
don't run dfrgntfs.exe directly. You use one of the front ends to it.
Trying to interface to it directly through the command line is why you
get the "Command line operation of Disk Defragmenter is not supported."

41,397 dfrg.msc
25,088 defrag.exe
105,472 dfrgntfs.exe

The front end apps use the Windows defrag API but those system calls
have to find code somewhere to run the defrag functions.

http://msdn.microsoft.com/en-us/libr...(v=vs.85).aspx
Ads