This article shows how to compile a bat file into an executable file. The compiled executable can run without showing a windows and you can pass command line parameters to it as you would pass them to the bat file.
The way this program compiles bat file is quite tricky and weird so I call this program a “Mock compiler”. Bat file is not even parsed. This program creates another program and adds the specified bat file as an embedded file in that program. When the generated program is executed, it extracts the embedded bat file to a temp folder and runs it using the
Process class. Simple, isn’t it?