简体   繁体   English

如何在没有尝试安装依赖项的情况下静默地从第三方执行innosetup安装程序?

[英]How to execute innosetup installer from third party silently and without it attempting to install dependencies?

I have an installer from a third party. 我有来自第三方的安装程序。 Through trial and error I discovered it was an innosetup installer. 通过反复试验,我发现它是一个固有的安装程序。 When I call it with the /silent flag it installs just fine, until it executes installers for 3 dependencies (direct X is one, for example) which then require user input to cancel. 当我使用/ silent标志调用它时,它安装得很好,直到它执行3个依赖项的安装程序(例如,直接X是一个),然后需要用户输入取消。 I want to be able to run the installer and have it either install the dependencies silently or not at all. 我希望能够运行安装程序并让它以静默方式安装依赖项或根本不安装依赖项。 When going through the installer GUI normally it does give me 3 checkboxes at the end on the last page of the wizard (before I would hit the Finish button) that allows me to choose whether or not to install the dependencies. 正常情况下,通过安装程序GUI时,它会在向导的最后一页末尾给我3个复选框(在我点击“完成”按钮之前),这样我就可以选择是否安装依赖项。 Is there a way of doing this that I don't know about? 有没有办法做到这一点,我不知道? From my research it seems impossible without knowing the types and components available (and executing the installer with the /help or /? options had no effect) and I will probably need to get a new installer from the third party. 根据我的研究,如果不知道可用的类型和组件(并且使用/ help或/?选项执行安装程序没有效果)似乎是不可能的,我可能需要从第三方获得新的安装程序。 The only other option I can think of would be to have some sort of timeout that after a certain period of time of inactivity from the installer I kill the install process (since the files I was interested in had already been installed at that point I think). 我能想到的唯一另一个选择就是有一些超时,在安装程序停止一段时间之后,我终止了安装过程(因为我感兴趣的文件已安装在那一点上,我认为)。

Checkboxes on the finish page sound like postinstall [Run] entries. 完成页面上的复选框听起来像postinstall [Run]条目。 There is no way to influence the selection of these from the command line, except that the original setup author can choose to have a different set of options selected for interactive install vs. silent install. 除了原始安装程序作者可以选择为交互式安装与静默安装选择不同的选项集之外,无法从命令行影响这些选择。 (Or they might have extended the /LOADINF option to work with these, although this is unlikely.) (或者他们可能已经扩展了/LOADINF选项以使用它们,尽管这不太可能。)

Given that this is a third-party installer, your best bet is to contact the original vendor and see if you can get them to change the default silent selection, or to add an additional command-line parameter to change the defaults. 鉴于这是第三方安装程序,最好的办法是联系原始供应商,看看是否可以让他们更改默认的静默选择,或添加其他命令行参数来更改默认值。

Failing that, you could consider using a program such as AutoIt to auto-click the wizard GUI when run non-silently. 如果做不到这一点,您可以考虑使用AutoIt等程序在非静默运行时自动单击向导GUI。

(If the things that it's trying to install really are dependencies, though, then you probably should let it install them. And it should be installing those silently too anyway.) (如果它试图安装的东西确实是依赖项,那么你可能应该让它安装它们。而且无论如何它都应该安静地安装它们。)

Killing the install process after a specified time seems like an excellent recipe for disaster. 在指定的时间之后杀死安装过程似乎是一个很好的灾难配方。

Those are probably [Tasks] within InnoSetup's install, which you may be able to deselect by passing /tasks="" in the command line (along with the /silent). 这些可能是InnoSetup安装中的[任务],您可以通过在命令行中传递/ tasks =“”(以及/ silent)来取消选择。 Here is a list of command line options: http://www.jrsoftware.org/ishelp/topic_setupcmdline.htm . 以下是命令行选项列表: http//www.jrsoftware.org/ishelp/topic_setupcmdline.htm Adding /suppressmsgboxes may help also. 添加/ suppressmsgbox也可能有所帮助。

It seems it is impossible to do what I wish without knowing more about the structure of their setup. 在不了解更多关于其设置结构的情况下,似乎不可能做我想做的事情。 I was however successful in solving my original problem by killing the third party installer after waiting a specified amount of time (which I got from reading this question ). 然而,我在等待一段指定的时间后(通过阅读这个问题得到的 )杀死了第三方安装程序,成功地解决了我的原始问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM