Skip to content

Portable BAT→EXE converter for Windows — turn .bat into a single .exe (custom icon, console/GUI, arg forwarding; no admin).

License

Notifications You must be signed in to change notification settings

the-sudipta/ExeFoundry

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

⚒️ ExeFoundry — BAT → EXE Converter (portable)

Turn any Windows Batch (.bat) into a single portable .exe.
Custom icon, console/GUI mode, and argument forwarding. No admin rights needed.

Windows Shell Requires License

Docs (PDF) Docs Section Quick Start

📄 Documentation

Tip: Put both the PDF and the ZIP in each Release along with checksums — this helps reviewers & professors find docs fast.

🧭 Background — Why this tool exists

Lots of handy internal tools still ship as .bat scripts. Users want something that’s double-clickable, has a proper icon, and can be shared as a single file without setup. ExeFoundry turns your batch into a clean .exe while keeping behavior identical.

  • Ship utilities as one file (easier to email/host).
  • Keep the original arguments and quoting behavior.
  • Offer a GUI mode for end-user apps (no console flash).

🚀 What ExeFoundry does (in simple words)

You give it a .bat. It builds a tiny C# launcher that runs your batch with the same arguments and (optionally) embeds an .ico as the app icon. Output is a single .exe.

  • No admin rights, registry edits, or system changes.
  • Works on standard Windows 10/11 with a C# compiler available.
  • Perfect for packaging scripts for non-technical users.

🧩 Typical use case

  1. Prepare your script: scripts\tool.bat.
  2. Build with ExeFoundry into Tool.exe (with or without a custom icon).
  3. Share the single EXE — users just double-click and pass arguments as usual.

Tip: For end-user facing tools, use the GUI build switch to hide the console.

🛡️ Good-citizen notes

ExeFoundry does not access OS core, registry, or services. It simply launches your batch.

  • No admin / elevation required.
  • For production distribution, consider code-signing the EXE.
  • Quote paths with spaces: "C:\Path With Spaces\script.bat".

🎯 Outcome

  • Input: .bat + (optional) .ico
  • Output: single .exe (console or GUI)
  • Argument forwarding preserved
  • Same behavior as the original batch

📊 Quick Start

  1. Create a batch file, e.g., scripts\hello.bat (example below)
  2. Open PowerShell in the repo root
  3. Run a build command (see examples)

⚙️ Config

Icon (.ico)GUI switchQuoting

# Use -Icon to embed an .ico; add -WinExe for a GUI build (no console)
# Always quote paths with spaces and use absolute/relative paths consistently.

🧠 How it works

  • Builds a tiny C# launcher that calls your .bat with proper quoting
  • Packs the launcher into a single .exe (with optional icon)
  • When run, the EXE executes the batch and forwards arguments

📦 Command-line options

Option Required Description
-InputBat Path to the source .bat file.
-OutputExe Output .exe path (default: same folder/name as BAT).
-Icon Optional .ico to embed as the EXE icon.
-WinExe Build as GUI app (no console window). Omit for console builds.

Examples

# Basic
.\ExeFoundry.exe -InputBat ".\scripts\build.bat"

# Custom output
.\ExeFoundry.exe -InputBat ".\scripts\build.bat" -OutputExe ".\Build.exe"

# Icon + Console (default)
.\ExeFoundry.exe -InputBat ".\scripts\tool.bat" -Icon ".\scripts\icon\bat_to_exe.ico"

# Icon + GUI (no console)
.\ExeFoundry.exe -InputBat ".\scripts\tool.bat" -OutputExe ".\Tool.exe" -Icon ".\scripts\icon\bat_to_exe.ico" -WinExe