Windows的自解压存档(EXE) [英] Self extracting archive (EXE) for Windows
问题描述
我正在寻找一种在Microsoft Windows平台上创建自解压存档(EXE)的简便方法.我知道有一个内置工具 IExpress.exe ,但是它具有向导样式的UI,我需要一个静默的"工具,可以通过脚本调用它.应该是:
I'm looking for an easy way to create a self extracting archive (EXE) on Microsoft Windows platforms. I know that there is a built-in tool IExpress.exe, but that has a wizard style UI and I need a "silent" tool, which can be called by scripts. It should be:
- 可编写脚本(Windows Shell脚本或Ant构建文件)
- 免费用于商业用途
- (可选)将文件解压缩到一个临时文件夹中,或询问用户将解压缩后的文件放在何处
- 必备条件:解压后自动在档案中启动可执行文件
- 没有创建桌面图标,开始菜单项等的技巧.只需将功能简单地解压缩到命名文件夹中即可.
- Scriptable (Windows shell script or Ant build file)
- Free for commercial use
- Optionally unpack in a temporary folder or ask the user where to put the unpacked files
- Nice to have: Auto launch an executable in the archive after unpack
- No knick-knack like creating desktop icons, start menu entries, etc. Just plain unpack functionality into a named folder.
推荐答案
工具列表 :我假设您已经检查过类似的东西? https://en.wikipedia.org/wiki/Self-extracting_archive .
Tools List: I assume you have already checked stuff like this? https://en.wikipedia.org/wiki/Self-extracting_archive.
iExpress: This tool has some severe security vulnerabilities. Don't use it please. It is tragic to deal with if your clients and customers face these problems. A wrong turn to make as they say.
7-Zip :我早些时候写了这个答案,与创建7-Zip存档时遇到的问题有关:
7-Zip: I wrote this answer some time back relating to problems seen when creating 7-Zip archives: Error Creating a 7-zip installer package. Although 7-Zip seems solid overall, I get the feeling that the self-extraction parts is not prioritized (as of yet). Or basically just not finished.
WinZip& WinRAR :我猜WinZip或WinRAR将是最常见和测试最多的解决方案,而不是该主题的专家.我总是更喜欢 真实的"设置工具 ,因为与自解压相比,这些工具通常要经过更好的测试档案由于它们的大量轮换"-大量使用.它们还非常擅长在最小依赖项场景(或常规系统")中运行,而没有太多奇怪的依赖项.而且它们似乎更容易被反病毒扫描程序识别,因此限制了误报的问题.我还发现它们更易于最终用户处理.
WinZip & WinRAR: I guess WinZip or WinRAR would be the most common and most tested solutions, without being an expert on the subject. I always prefer "real" setup tools since these are generally much better tested than self-extracting archives due to their "heavy rotation" - plenty of use. They are also pretty good at running in minimum dependency scenarios - or on "normal systems" - without too many weird dependencies. And they appear more recognizable by anti-virus scanners and hence limiting the problem of false positives. I also find them easier for end users to deal with.
我们可以问一下为什么您需要这种方法来进行自我提取吗? Windows已经内置了对Zip的支持?只是问一下,我肯定有很好的理由.
Can we ask why you need this to be self-extracting? Zip support has been built into Windows for quite some time? Just asking, I am sure there are very good reasons.
这篇关于Windows的自解压存档(EXE)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!