Command Line Switches - Keeping Command Window Open?Feb 24, 2010
I am using the following code to run defrag and to analyze if the C: drive requires defragmentation:
Dim analyze As Process = System.Diagnostics.Process.Start("C:WindowsSystem32defrag.exe", "C: /a /h /u /v")
This process runs through analyzing, runs it in normal mode & prints the progress to the command window.
My problem is that as soon as the process is complete the command window closes. I need it to stay open so that I can read the results.