Good afternoon, if anyone can help me with this i would be most appreciative

Im looking for a way to invoke the Defrag through visual basic, the defrag part i can do but i want to be able to analyze it first, to see if actually needs defragmentation

i know you can use Run
--> CMD --> defrag.exe C: -A
to analyze it, but the question is does it log it anywere? if it writes to a log file then i...