In order to prevent another command windows from showing, I have tried the following two methods
1)
StartInfo.UseShellExecute = true;
StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
2)
StartInfo.UseShellExecute = false;
Is there any pros and cons of those usage?
There are many advantages of setting StartInfo.UseShellExecute to false.
One of which is if you can redirect standard input,standard output and standard error and read those streams. This is very useful when something goes wrong. By reading standard error stream you can determine whether any error had occured or not.
For more information on shellExecute follow this link
About StartInfo.WindowStyle property, if we keep it to false command prompt pops up when process starts. If your application has nice,rich UI and then suddenly one black window pops up, it will annoy users plus some users might try to close command prompt before process exits.. and there are many more reasons for keeping window hidden.