Batch File compiler

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?

Download

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: