Technical Anshu
Tutorials Blog
Version Discipline

Keep the Source BAT File as the Master Version Discipline for Converted EXE Files

The EXE cannot be edited, patched or even read properly. The BAT file is the real asset - here is the simple discipline that keeps your tools maintainable for years.

By Technical AnshuWindows 10 / 117 minute read
Watch the full video - the complete BAT to EXE conversion process shown live, step by step

Conversion creates a quiet trap: the EXE looks like the product, so people start treating it as the only copy - until the day it needs one small change and there is nothing editable left. Professionals avoid this with a habit borrowed from real software development: the source is the master, the EXE is a build. This page gives you the naming, folder and rebuild discipline that makes converted tools maintainable instead of disposable.

A tidy tools folder (example)
Source - the masters
CleanupTool_v2.0.bateditable original
CleanupTool_v2.1.bateditable original
Builds - the outputs
CleanupTool_2.1.0.exeshipped build
Nobody can tell you what is inside an EXE named final2_NEW.exe - not even you, next month
Treat the EXE the way programmers treat compiled programs: a build output that can always be regenerated from source.
1

The EXE Is a Build Output, Not a Document

Programmers learned this lesson decades ago: you edit the source, and the program is rebuilt from it. Your workflow after conversion is identical. The .bat file is the only editable truth; the .exe is a snapshot of it. You cannot open the EXE, fix a line and save - the moment you accept that, half of all tool-keeping chaos disappears. Every fix, every improvement, every customer request starts in the BAT, gets a new version number, and is converted fresh.

2

A Folder and Naming System That Scales

  1. One folder per tool, with a source subfolder for BAT files and a builds subfolder for EXEs
  2. Source files carry the version in the name: CleanupTool_v2.1.bat
  3. Each build’s version in the EXE must match the version information embedded at conversion time
  4. Keep the icon file and a small notes.txt in the tool folder - what changed, when, and why
  5. Never rename a shipped build afterwards; if it is wrong, rebuild it with the next version number
3

Rebuilds Must Be Repeatable

Manual clicking invites drift - you tick admin manifest on Monday and forget it on Friday, and two “same version” EXEs behave differently. The converter’s command line removes the guesswork: keep one build command per tool in a text file and run it verbatim, for example Bat_To_Exe_Converter.exe -bat source\CleanupTool_v2.1.bat -save builds\CleanupTool_2.1.0.exe -icon cleanup.ico -admin. Same inputs, same options, same result - every single time. There is a full page in this series on command-line builds.

4

Backups and the Day the Source Saves You

Sooner or later a customer will report a bug in a build whose source you “cleaned up”. Without the matching BAT you cannot see what the tool actually did, cannot fix it, and cannot prove anything either way. Keep the whole tools folder in your normal backup, and keep at least the current and previous source versions of every shipped tool. Storage costs nothing; reconstructing a lost script from a wrapped EXE, under pressure, costs a day - and the extraction trick from this series only helps if a copy of the EXE still exists.

Watch the Complete Process in the Video

Watch the video for the conversion step itself - then organise your tools folder as this page describes before you build your second EXE.

Watch Full Video
Frequently Asked Questions

Can I edit the script inside a converted EXE directly

No. The EXE is a wrapper package, not an editable document. Extractors can recover a copy of the text in an emergency, but the supported workflow is always: edit the BAT source, raise the version, convert again.

How many old versions should I keep

Keep every source version you have ever shipped if you can, and at minimum the current and previous one. Source BAT files are a few kilobytes each - the cost is nothing next to the cost of reconstructing a lost script.

My tool folder is already a mess of final and new files. Where do I start

Pick the newest EXE you trust, extract or rewrite its script into a clean BAT, declare that version 1.0 of your new system, and follow the naming and folder rules from today forward. Do not try to archaeology every old build.

This guide is based on the Technical Anshu video linked above - Stuck on a step? Ask in the video comments - you will get an answer