Please let us know how useful you find this tip by rating it below. Do you have a useful Windows tip, timesaver or workaround to share? Submit it to our tip contest and you could win a prize!
Since the DOS
On the downside, batch files are easily hacked, edited, and reverse-engineered, making them problematic to rely on in certain situations.
I've written before about some ways around this, such as using elevated or deprecated privileges, but one of the more interesting tools I've seen for working with batch files is a program called Quick Batch File Compiler (QBFC).
QBFC takes any command-line batch program and compiles it into an encrypted executable or .EXE file. An .EXE file is much harder to casually reverse-engineer, so this could be a way to conceal a particular batch file's operations from an end user. For instance, if you had a network environment where a batch script was run at logon, and you wanted key information in the script hidden, the script could be converted to an .EXE and protected from prying eyes a lot more easily than a conventional batch file. (.EXE files also run faster than batch files, of course.)
QBFC can create two types of applications: a standard console application, which accepts conventional command-line parameters, or a "ghost" application, which opens no windows and provides no feedback. The latter is best for security or for when you want to perform an install or modification silently. QBFC also lets you set various resources in the .EXE file, such as its description, the company name, version information and even the application icon.
QBFC's shareware version is unrestricted, except that all .EXEs produced by the program flash a brief note at startup. The registered version does not have this limitation.
Serdar Yegulalp wrote for Windows Magazine from 1994 through 2001, covering a wide range of technology topics. He now uses his expertise in Windows NT, Windows 2000 and Windows XP as publisher of The Windows 2000 Power Users Newsletter and writes technology columns for TechTarget.
This was first published in April 2005