How to execute a .bat file from a C# windows form app?

前端 未结 2 1348
被撕碎了的回忆
被撕碎了的回忆 2020-12-20 12:39

What I need to do is have a C# 2005 GUI app call a .bat and several VBScript files at user\'s request. This is just a stop-gap solution until the end of the holidays and I c

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-20 13:31

    Here is what you are looking for:

    Service hangs up at WaitForExit after calling batch file

    It's about a question as to why a service can't execute a file, but it shows all the code necessary to do so.

提交回复
热议问题