In this article we are going to take a look at “How to convert batch files (.bat) into executable files (.exe)”. In this tutorial, I’m going to demonstrate this with the help of a tool known as ‘bat2exe’ and is available to download at SourceForge. It’s an open source program which converts a .bat file into .exe file.
So, let’s begin!!
Firstly, we will have to create a workspace folder for putting all the batch files at one place. I’ve created a folder named ‘bat’ in my ‘C’ drive.
Now, open your favorite file editor and type the batch code. I prefer to use ‘Notepad++’. And for this demonstration I’ll be using the batch program from my previous article which we have used to alter or manipulate the ‘hosts’ file.
Once you’ve written your code, you have to save it as ‘.bat’ and it should be saved in the workspace folder, which in my case is ‘C:bat’. You can see the same done in the image below.
After you are done saving the batch file in the specified folder, it’s time to run ‘Bat2Exe’ converter.
Once you start ‘Bat2Exe’ program it will look something similar to the image below.
As you can notice that it asks for the workspace path where you have to provide your specified folder path in which your batch is present.
Once you have provided the path hit ‘Enter’ key and you will be presented with something like this, as shown below. That means, you are done!!!
Now, open you workspace folder and you’ll notice that your executable is ready!
So, You are done…