How to use the commands of command prompt or run Shortcuts in a program

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sentimental37
    New Member
    • May 2010
    • 23

    #1

    How to use the commands of command prompt or run Shortcuts in a program

    Hi guys, i m developing an application in which i want to run the commands of the command prompt without starting cmd at that time just input commands in a text box and they should run and the same with shortcuts of run.how to do this plzzzz help""??????
  • Subin Ninan
    New Member
    • Sep 2010
    • 91

    #2
    Code:
    ProcessStartInfo pInfo = new ProcessStartInfo(textBox1.Text, textBox2.Text);
    Process proc = new Process();
    proc.StartInfo = pInfo;
    proc.Start();
    textBox1 will have command & textBox2 will have command line argument

    Comment

    Working...