I am writing a application that monitor the system's health, user should know when they need to defrag the volumes.
What I am thinking is calling the "defrag.exe /A" then analyze the output result to see whether it contains "You do not need to defragment this volume."
But it's slow and very bad, I fount that the "Analyze" is really quick on the MyDefrag.exe.
Anyone could tell me what's the best and simplest way?