Convert your exe file to bat on Windows

How to convert .exe file to .bat using exe2powershell


exe2powershell is used to convert EXE to BAT files, previously a well known tool for this was exe2bat, this is the version for modern Windows 8, 10.

Convert exe to bat on Windows
Running exe2powershell

exe2powershell allows you to convert any binary file (*.exe) into a BAT file, with the resulting BAT file containing only exe commands followed by a PowerShell command to recreate the original binary file.

Such a tool can be useful during a pentest when you need to start a shell without any boot function. With exe2 and PowerShell, the auditor can load any binary into the target system.

This version has been updated with exe2bat to work with current versions of Windows, as exe2bat had some limitations:

  1. Requires debug.exe on the destination computer (a 16-bit application that was removed in Windows 7 x64 but is available in Windows 7 x86).
  2. Limits the input exe file size to 64 KB.

exe2powershell replaces the need to use debug.exe with the PowerShell command line, which is available on all Windows starting with Windows 7 / 2008, and there is no more restriction on the size of the exe you type.

Using exe2powershell to convert EXE files to BAT files

To convert an exe file into a bat, run the following command:

exe2powershell.exe inputfile outputfile

For example we can convert nc.exe to nc.bat by typing:

exe2powershell.exe nc.exe nc.bat

Pros and cons of exe2powershel


  • Easy to use.
  • Quickly converts .exe to the .bat.
  • Works on new Windows operating systems.
  • Open Source.


  • Only for new Windows operating systems.
  1. Good article, but can you write about how to convert bat file to exe bcs in some situations it`ll be important to know.

    Also if you know maybe you will write how to convert any file, shortcut, bat, vbs to exe file?

    1. Hy, thanks for your comment. I`ll write about how to convert any file to exe.

  2. Hi Stas, is it any other way to convert exe to bat or bat to exe without using exe2powershell? Can u write th same article or reply to comment. TY.

    1. Hi, ty for ur comment. In the future I`ll write article about how to convert exe to bat, or how to convert files such as shortcut, bat, vbs to exe.

Leave a Reply

Your email address will not be published. Required fields are marked *

You May Also Like