This does not work. Your code doesn´t contains space. I´ve tried that with space after the "c" switch, but it does not work either. And, I´ve noticed that in task manager there are many "cmd" and "conhost" processess.

I was thinking about one possible solution which could work, but problem is that some operations will be executed much faster than others i.e. it´s not possible to terminate CMD process after a fixed amount of time. One solution could be to detect file length and calculate optimal termination time based on, but this can vary from file to file - that´s not universal for two different files with same size. Another solution could be to detect if output is generated and if yes, terminate cmd.exe.

Is there an another way?

Thanks.
VB.NET Developer