| 1. |
Solve : Compiling BAT to EXE failiure? |
|
Answer» Hello all. So then, What is it that i need to do in order to get these EXE files to work?? they are in basic BAT file language, and work as a BAT, but not EXE.The short and most precise answer is that you cannot compile batch files. Converting a batch file to an executable is rather silly, because the only reason to do so is usually to "hide the code" but the way the exe converter's work, they typically just plonk the batch file at the end of a stub executable that writes the batch to a temporary folder and executes it. It gains you nothing but additional headaches. If the OP would provide a sample of the kind of batch he does, others could check out the compatibility issues. The codes are very simple. Such as @ echo off open notepad.exe exit Ext. Quote from: zeroburn on March 21, 2012, 09:09:54 PM The codes are very simple. Such as So why bother "compiling" them? Quote from: zeroburn on March 21, 2012, 09:09:54 PM The codes are very simple. Such asPlease use code tags around your code. Code: [Select]H:\>open /? 'open' is not RECOGNIZED as an internal or external command, operable program or batch file.You should be using the START command or just putting NOTEPAD.exe in your batch file by itself.I have used such a compiler to make an .exe file out of a batch file, but it's OLD. Old means that it was written before many of the batch commands were changed and new ones added. That little batch file quoted above is pretty simple, but "Open" is the wrong word. If more commands are to follow that line, then the proper word would be "Start". exit is not required at all as the batch file is done and will close when the last command is run. To run or "open" notepad, just put a shortcut to it on your desktop or in your Quick Launch Toolbar. Much quicker and easier. When I have compiled a batch file, in the distant past, I've made it as simple as possible, with NO Rem statements, line spaces or extraneous commands. Just the basics! Cheers Mate! Quote from: Squashman on March 22, 2012, 07:03:13 AM Please use code tags around your code. Not necessary in this case. It's just an option. I prefer monospace (the little typewriter) myself. |
|