bat脚本执行exe文件
When you get down to it, batch files and executable files work pretty much the same way. Both are simply a set of instructions and logic for Windows execute. So why would you want to convert a batch file to an executable if they essentially work the same? Here are a few reasons:
当您了解它时,批处理文件和可执行文件的工作方式几乎相同。 两者都是Windows执行的一组指令和逻辑。 那么,如果批处理文件本质上相同,为什么还要将批处理文件转换为可执行文件呢? 原因如下:
- Portability – you can include additional tools in your EXE file that the batch file depends on. 可移植性–您可以在批处理文件所依赖的EXE文件中包括其他工具。
- Protection – an EXE provides protection for your source script to ensure it is not inadvertently modified. 保护-EXE为您的源脚本提供保护,以确保它不会被无意间修改。
- Convenience – Executable files can be pinned to the Windows Start Menu and/or Windows 7 Task Bar. 便利性–可执行文件可以固定到Windows“开始”菜单和/或Windows 7任务栏。
With the script below, you can easily build your own executable file from a batch file, complete with and required embedded tools.
使用下面的脚本,您可以轻松地从批处理文件构建自己的可执行文件,其中包括必需的嵌入式工具。