Converting batch files to .EXEs

19 03 2007

I commonly use batch and script files in Windows and Linux respectively – they’re easy to code, save time for the end user and work instantly on a single double-click (well, most of the time). Sometimes however, it’s useful to convert them to an executable format to stop well-meaning users unintentionally fiddling with them.

Over on Daily Cup of Tech, Tim Fehlman writes about how to turn a Windows batch file into an executable.

That’s all well and good, but I can see at least two problems with this:

  1. What if the batch file needs to be modified? It can’t be edited by the end user unless they edit the source .bat file and then recompile it.
  2. There’s no way I know of to do this for Linux. Any ideas?
  3. It’s not technically been compiled, it’s just a wrapper around the batch file.
  4. What if the file in particular being called by the batch file doesn’t exist? There is no way I can see to handle exceptions in batch files.

Actions

Information

Leave a comment