更改第 3 方 InstallShield 安装程序的默认复选框状态

发布于 2025-01-08 09:03:22 字数 2694 浏览 0 评论 0原文

我正在编写我们的客户经常需要安装的几个软件包的安装程序/捆绑包。基本上它只包含几个可执行安装程序。对于用户选择的每个组件,它将安装程序提取到临时文件夹并运行它。

其中一个安装程序适用于 AVR Studio 5.1,由第三方 (Atmel) 制作。可以在此处下载:http://www.atmel。 com/Images/as5installer-stable-5.1.208-full.exe (616 MB)。

不幸的是,Atmel 在安装程序末尾添加了一个复选框,让用户可以选择启动 AVR Studio 5.1,并且默认情况下会选中该复选框: AVR Studio 5.1 完成屏幕

如果用户只是单击“完成”(大多数用户可能会这样做),则 AVR Studio 5 将采取在屏幕上,我的安装程序将留在后台。用户可能会忘记我的安装程序,并且无法完成捆绑包中其他组件的安装。

有人能想出一个好的解决方案吗?我想到了一些:

1) 第 3 方安装程序似乎是用 InstallShield 编写的。是否有一些标准方法可以将命令行选项传递给 InstallShield 安装程序以禁用该复选框或将其默认状态更改为未选中?

2) 我当前的解决方案是在第 3 方安装程序完成后休眠 10 秒,然后然后使用 NSIS 的 BringToFront 命令将我的安装程序窗口置于前面。它在 Windows 7 Pro 上适用于我,但我听说它并不总是有效,可能只是突出显示窗口。

3)静默安装似乎不起作用。当我从命令行尝试它时,第 3 方安装程序仅运行一段时间然后退出。如果你能做到这一点,请告诉我。

4)不幸的是,我不能最后运行第 3 方安装程序,因为我的其他安装程序之一需要在它之后运行并将一些文件复制到其安装目录中。

我的安装程序是用 NSIS 编写的,如果这有什么不同的话。感谢您的任何建议!


更新 1,2012 年 2 月 27 日下午 6:30:

感谢 Michael Urman(InstallShield 的技术主管!)和 Christopher Painter 的提示。 Christopher 表示,有问题的安装程序是 InstallScript InstallShield 安装程序,而不是基于 MSI 的 InstallShield 安装程序。我发现这篇关于 InstallScript 与 InstallScript MSI 的文章对我有帮助了解其中的区别。

我们现在有两种从安装程序中提取文件的方法:使用 UniExtract 或运行 as5installer- stable-5.1.208-full.exe /extract_all:c:\extract。这两种方法似乎提取同一组文件,您可以在此处看到:

从 /extract_all 选项检索的文件。

我无法通过双击或使用 UniExtract 来提取 *.cab 文件。我无法使用 UniExtract 提取 setup.exe。我可以运行 setup.exe,它的行为似乎与 as5installer-stable-5.1.208-full.exe 相同。有一个 setup.iss 文件,它看起来有点类似于我尝试静默安装时创建的文件。如果需要,您可以查看 setup.iss 的内容

我想知道:安装程序中包含 setup.exe 是正常的还是 Atmel 做了一些奇怪的事情?运行此 setup.exe 相当于运行 as5installer-stable-5.1.208-full.exe 吗?另外,安装程序中包含 setup.iss 是否正常?它有何用途?

您还可以使用 7-zip 查看安装程序中的文件,但它是一组不同的文件,似乎未完全提取。

Christopher 的建议是 .iss 文件末尾的 bOpt1、bOpt2 或 bOpt3 选项之一对应于我尝试禁用的复选框。结合 Michael 的建议,我尝试使用以下命令安装 AVR Studio 5.1:

as5installer-stable-5.1.208-full.exe /v"bOpt1=0 bOpt2=0 bOpt3=0"
as5installer-stable-5.1.208-full.exe /v"bOpt1= bOpt2= bOpt3="
setup.exe /v"bOpt1= bOpt2= bOpt3="

不幸的是,我没有观察到任何行为差异。当我单击完成时,该复选框仍然处于选中状态,并且它仍然启动 AVR Studio 5.1。也许我在命令行上以错误的方式指定了多个属性覆盖?我还有一些想法可以尝试,但我很想知道其他人是否也有任何想法。有没有办法在不进行静默安装的情况下使用 .iss 文件,或者这是它的唯一目的?

I am writing an installer/bundle of several software packages that our customers frequently need to install. Basically it just includes several executable installers in it. For each component the user chooses, it extracts the installer to a temporary folder and runs it.

One of these installers is for AVR Studio 5.1, and it is made by a third party (Atmel). It can be downloaded here: http://www.atmel.com/Images/as5installer-stable-5.1.208-full.exe (616 MB).

Unfortunately, Atmel added a checkbox at the end of the installer that gives the user the option to launch AVR Studio 5.1, and it is checked by default:
AVR Studio 5.1 Finish screen

If the user just clicks "Finish", as most users probably will, then AVR Studio 5 will take over the screen and my installer will be left in the background. The user will probably forget about my installer and fail to finish installing the other components of the bundle.

Can anyone think of a good solution to this? I've thought of some:

1) The 3rd-party installer appears to be written with InstallShield. Is there some standard way I can pass a command line option to an InstallShield installer to disable the checkbox or change its default state to unchecked?

2) My current solution is to sleep for 10 seconds after 3rd-party installer finishes and then bring my installer window to the front using NSIS's BringToFront command. It works for me on Windows 7 Pro but I've heard it doesn't always work and might instead just highlight the window.

3) Doing a silent install doesn't seem to work. When I try it from the command line, the 3rd party installer just runs for a bit and then quits. If you get that to work, let me know.

4) Unfortunately, I can NOT just run the 3rd party installer last, because one of my other installers needs to run after it and copy some files into its installation directory.

My installer is written in NSIS, if that makes a difference. Thanks for any advice!


Update 1, 2012-02-27, 6:30pm:

Thanks for the tips from Michael Urman (the technical lead at InstallShield!) and Christopher Painter. Christopher says the installer in question is an InstallScript InstallShield installer, not an MSI-based InstallShield installer. I found this article about InstallScript vs. InstallScript MSI which helped me understand the difference.

We now have two ways of extracting the files from the installer: using UniExtract or running as5installer-stable-5.1.208-full.exe /extract_all:c:\extract. These two ways seem to extract the same set of files, which you can see here:

Files retrieved from the /extract_all option.

I am unable to extract the *.cab files by double clicking on them or using UniExtract. I am unable to extract setup.exe using UniExtract. I can run setup.exe and it seems to behave the same as as5installer-stable-5.1.208-full.exe. There is a setup.iss file which looks kind of similar to the file I created when I tried a silent install. You can see the contents of setup.iss if you want.

I wonder: is it normal to have a setup.exe inside an installer or is Atmel doing something odd? Is running this setup.exe equivalent to running as5installer-stable-5.1.208-full.exe? Also, is it normal to have a setup.iss inside the installer and what purpose would it serve?

You can also look at files in the installer using 7-zip but it's a different set of files that don't seem to be fully extracted.

Christopher's suggestion was that one of the bOpt1, bOpt2, or bOpt3 options at the end of the .iss file corresponds to the checkbox I am trying to disable. Combining that with Michael's suggestion, I tried installing AVR Studio 5.1 with the following commands:

as5installer-stable-5.1.208-full.exe /v"bOpt1=0 bOpt2=0 bOpt3=0"
as5installer-stable-5.1.208-full.exe /v"bOpt1= bOpt2= bOpt3="
setup.exe /v"bOpt1= bOpt2= bOpt3="

Unfortunately, I didn't observe any difference in behavior. The checkbox was still checked and it still launched AVR Studio 5.1 when I clicked Finish. Maybe I'm specifying multiple property overrides on the command line in the wrong way? I have a few more ideas of things to try but I'm interested to know if anyone else has any ideas too. Is there any way to use a .iss file without doing a silent install or is that its only purpose?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

葬心 2025-01-15 09:03:22

复选框与属性关联,通常这些属性是公共属性。如果是这样,您可以在命令行上覆盖该属性,msiexec /i the.msi PROPERTY=override-valuesetup.exe /v"PROPERTY=override-value"。但是,它可能是私有财产,或者在安装程序内被覆盖。在这种情况下,您可能必须创建一个转换 。 (您可以通过在命令行的 TRANSFORMS 属性中列出来应用转换。)

鉴于安装是基于 InstallScript 的更新,上述命令行建议不适用。自定义脚本可以使它们(或类似的东西)工作,但这并不常见。更常见的是对静默脚本的支持,正如 Christopher 在他的回答中使用 /r/s 参数提到的那样。然而,听起来有问题的安装可能已经用静默脚本做了一些有趣的事情,所以集成这种方法可能行不通。我建议重新包装(就像克里斯那样)或联系供应商。

Checkboxes are associated with properties, and typically these will be public properties. If so, you can likely override that property on the command line, either msiexec /i the.msi PROPERTY=override-value, or setup.exe /v"PROPERTY=override-value". However it's possible that it's a private property, or is otherwise overridden inside the installer. In that case you may have to create a transform instead. (You apply the transform by listing it in the TRANSFORMS property on the command line.)

In light of the update that the installation is an InstallScript based one, the above command-line recommendations do not apply. A custom script could make them (or something similar) work, but it is uncommon. More common is the support for silent scripts as Christopher alluded to in his answer with the /r and /s parameters. However it sounds like the installation in question might be doing something interesting with a silent script already, so integrating this approach may not work. I would suggest repackaging (as Chris has) or contacting the vendor.

原来是傀儡 2025-01-15 09:03:22

好吧,我终于找到了一些空闲时间来下载该 EXE,这就是我找到的内容。

这是一个 InstallScript 安装程序,而不是 MSI。因此,运行以下命令(从提升的命令提示符处):

as5installer-stable-5.1.208-full /extract_all:c:\extract

现在抓取 C:\extract\disk1 中找到的文件

对于 InstallScript 项目,您有记录和回放 UI 的概念。

  • /r - 记录
  • /s - 静默
  • /f1 - 静默响应文件 ( .iss ) 的路径
  • /f2 - 日志文件的路径

该软件包已具有 setup.iss 文件。看一下它的结尾:

[{D574D18C-9D52-4B4B-9647-AE6B89FD3F70}-SdFinish-0]
Result=1
bOpt1=0
bOpt2=0
bOpt3=0

这些布尔选项之一是您需要更改的值。剩下的事情就交给你来解决吧。您可能必须记录一个新的 ISS 文件,并且总是有可能有人编写了一些蹩脚的安装脚本,无论您做什么,该脚本总是将该复选框设置为 true。在这些情况下,您必须分解重新打包工具并将其转换为 MSI 格式。

Ok, I finally found some free time to download that EXE and here's what I found.

It's an InstallScript installer not MSI. So run the following command ( from elevated command prompt) :

as5installer-stable-5.1.208-full /extract_all:c:\extract

Now grab the files found in C:\extract\disk1

For InstallScript projects you have the concept of recording and playing back the UI.

  • /r - record
  • /s - silent
  • /f1 - path to silent response file ( .iss )
  • /f2 - path to log file

The package already has a setup.iss file. Take a look at the end of it:

[{D574D18C-9D52-4B4B-9647-AE6B89FD3F70}-SdFinish-0]
Result=1
bOpt1=0
bOpt2=0
bOpt3=0

One of those boolean options is the value you need to change. I'll leave it to you to figure out the rest. You may have to record a new ISS file and it's always possible that someone wrote some craptastic installscript that always sets that checkbox to true regardless of what you do. In those cases you have to break out the repackaging tools and convert it to MSI format.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文