How to run DOS/CMD/Command Prompt commands from VB.NET?

前端 未结 5 862
旧时难觅i
旧时难觅i 2020-12-08 16:38

The question is self-explanatory. It would be great if the code was one line long (something to do with \"Process.Start(\"...\")\"?). I researched the web but o

5条回答
  •  旧巷少年郎
    2020-12-08 16:46

    You Can try This To Run Command Then cmd Exits

    Process.Start("cmd", "/c YourCode")
    

    You Can try This To Run The Command And Let cmd Wait For More Commands

    Process.Start("cmd", "/k YourCode")
    

提交回复
热议问题