以编程方式提取 InstallShield setup.exe 的内容 [英] Programmatically extract contents of InstallShield setup.exe

查看:20
本文介绍了以编程方式提取 InstallShield setup.exe 的内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试提取 InstallShield setup.exe 文件的文件内容.(我的计划是在后台工具中使用它,因此这必须以编程方式完成,无需任何用户交互.)

I am trying to extract the file-contents of an InstallShield setup.exe-file. (My plan is to use it in a back-office tool, so this must be done programmatically without any user interactions.)

这可能吗?
(初步研究似乎表明它会失败.)

Is this possible?
(Initial research seems to indicate it will fail.)

如果可以有一个通用的解决方案,那么对于所有最新版本的 InstallShield 来说都是最好的.
否则,如果某个解决方案仅适用于某些版本的 InstallShield,那么这将是前进的一步.(可能可以通过查看 exe 文件的版本资源来推断 setup.exe 是哪个 InstallShield 版本.

If it is possible to have a generic solution, for all recent versions of InstallShield that would be best.
Otherwise, if a solution only works for some versions of InstallShield it would be a step on the way. (It would probably be possible to deduce which InstallShield version a setup.exe is by looking at version resources of the exe-file.

发现某些 InstallShield 版本支持 /b/extract_all.然而,没有好的方法知道,只是启动 exe 并希望它能够有序地提取和终止而不是显示 GUI 对话框似乎不是一个好的解决方案.因此,我正在寻找一种更稳定的方法.
欢迎提出想法.

I found that some InstallShield versions support /b or /extract_all. However there is no good way of knowing, just launching the exe and hoping it will extract and terminate orderly rather then displaying GUI dialogs doesn't seem like a good solution. So I am therefore looking for a more stable way.
Ideas welcome.

推荐答案

没有支持的方法来执行此操作,但是您不必检查与每个安装程序相关的文件以找出在提取它们后如何实际安装它们?假设您可以花时间找出适用的命令行,以下是一些通常允许您提取安装的候选参数.

There's no supported way to do this, but won't you have to examine the files related to each installer to figure out how to actually install them after extracting them? Assuming you can spend the time to figure out which command-line applies, here are some candidate parameters that normally allow you to extract an installation.

基于 MSI(可能无法生成可用于 InstallScript MSI 安装的映像):

MSI Based (may not result in a usable image for an InstallScript MSI installation):

  • setup.exe/a/s/v"/qn TARGETDIR="choose-a-location""

或者,也提取先决条件(适用于它工作的版本),

or, to also extract prerequisites (for versions where it works),

基于安装脚本:

  • setup.exe/s/extract_all

基于套件(可能不太清楚如何安装生成的文件):

Suite based (may not be obvious how to install the resulting files):

  • setup.exe/silent/stage_only ISRootStagePath="choose-a-location"

这篇关于以编程方式提取 InstallShield setup.exe 的内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆