Running DOS command through C# just opens blank cmd window
Posted
by Mohit Deshpande
on Stack Overflow
See other posts from Stack Overflow
or by Mohit Deshpande
Published on 2010-03-28T00:53:08Z
Indexed on
2010/03/28
1:03 UTC
Read the original article
Hit count: 402
I was trying to execute a command through C#, but when I run the following code, a blank cmd window just opens up. The code:
string command = string.Format(@"adb install C:\Users\Mohit\Programming\Android_Workspace\{0}\bin\{0}.apk", appName);
ProcessStartInfo cmdsi = new ProcessStartInfo("cmd.exe");
cmdsi.Arguments = command;
Process cmd = Process.Start(cmdsi);
What could be wrong? I am sure the syntax is right.
© Stack Overflow or respective owner