startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
startInfo.FileName = "cmd.exe";
startInfo.Arguments = "/C attrib advancedcleanmgr.reg +s +h & cleanmgr sagerun:6553";
The effect of this section of code is to start a hidden instance of cmd.exe and execute
1) attrib.exe followed by 2) cleanmgr.exe
The output of attrib.exe won't be seen as the output console is hidden, but cleanmgr being a GUI program, will display it's own interface.
The solution should be to start cleanmgr directly without the help of cmd.exe
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;
startInfo.FileName = "cleanmgr.exe";
startInfo.Arguments = "sagerun:6553";
That said, when I tried it on my XP system, cleanmgr's initial window was hidden but the individual progress windows displayed as each disk drive was processed were still visible.
Alan.