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

查看:186
本文介绍了以编程方式提取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),

基于InstallScript:

InstallScript based:

  • 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天全站免登陆