Is it possible to embed a bat file in .exe and use it with the Process class?

前端 未结 4 995
轻奢々
轻奢々 2021-01-06 13:25

I\'ve created a batch file that is being used with a Process. I currently just have the application pointing to a directory on my local machine.

Rather than having

4条回答
  •  难免孤独
    2021-01-06 13:39

    How about this approach:

    • store your batch file in your program (as resource or string constant or ...)
    • save the contents to a temporary file
    • run this temporary batch file

提交回复
热议问题