windows-installer - 如何在 installshield 中添加先决条件文件夹?

标签 windows-installer installshield

我们正在使用 installShield 在 Vs 2012 中创建 setup.exe 和 msi 文件。我有一个先决条件 (dfcWinSuiteSetup.exe),我需要先安装它。要安装它,我创建了一个先决条件文件 (.prq) 并指定了第 3 方 exe 路径,但该 exe 对其他文件(一些 jar 文件)有一些依赖性。现在,当我构建解决方案并运行生成的 setup.exe 时,它​​失败了,因为依赖的 jar 不是 setup.exe 的一部分。 谁能告诉我如何在我的 setup.exe 中包含依赖 jar? 我的 prq 文件是。

<?xml version="1.0" encoding="UTF-8"?>
<SetupPrereq>
    <conditions>
        <condition Type="16" Comparison="2" Path="[WindowsFolder]\Documentum" FileName="dctm.jar" ReturnValue=""></condition>
    </conditions>
    <files>
        <file LocalFile="&lt;ISProductFolder&gt;\SetupPreRequisites\Redistributables\dfcWinSuiteSetup.exe" URL="" FileSize="0,0"></file>
    </files>
    <execute file="dfcWinSuiteSetup.exe" cmdline="" cmdlinesilent=""></execute>
    <properties Id="{0278E528-E72C-439F-AE2A-BEFCB27EA9A3}" Description="This prerequisite installs the DFC for window setup" AltPrqURL=""></properties>
    <behavior Reboot="2"></behavior>
</SetupPrereq>

最佳答案

您可以在 <files> 中添加多个文件.prq 文件中的元素,与添加第一个元素的方式完全相同。

<files> 中列出的所有文件将被嵌入到同一个文件夹中(类似于:ISSetupPrerequisites\{SOME-GUID-...})

然后,<execute file="..."/>让安装程序知道必须为您的先决条件执行哪个文件。

您的 .prq 文件应如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<SetupPrereq>
    <conditions>
        <condition Type="16" Comparison="2" Path="[WindowsFolder]\Documentum" FileName="dctm.jar" ReturnValue=""></condition>
    </conditions>
    <files>
        <file LocalFile="&lt;ISProductFolder&gt;\SetupPreRequisites\Redistributables\dfcWinSuiteSetup.exe" URL="" FileSize="0,0"></file>
        <!-- add your other files here -->
        <file LocalFile="PATH/TO/YOUR/JAR/FILE" URL="" [...] />
    </files>
    <execute file="dfcWinSuiteSetup.exe" cmdline="" cmdlinesilent=""></execute>
    <properties Id="{0278E528-E72C-439F-AE2A-BEFCB27EA9A3}" Description="This prerequisite installs the DFC for window setup" AltPrqURL=""></properties>
    <behavior Reboot="2"></behavior>
</SetupPrereq> 

希望这对您有所帮助。

关于windows-installer - 如何在 installshield 中添加先决条件文件夹?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24603888/

相关文章:

window - Inno Setup - 签名失败并显示 "Sign Tool failed with exit code 0x1"

visual-studio-2010 - 为什么 InstallShield 向导不显示上次卸载页面?

windows-installer - 为 MSI 包设置最小磁盘空间

windows-installer - 如果注册表中存在特定键,则中止 Install Shield 安装

visual-studio-2012 - Visual Studio - 使用 System.Data.SQLite 在项目中安装 InstallShield

c# - 多个 .NET 配置文件和安装项目问题

wix - 用户配置文件的每台机器安装问题

c# winapp 将 app.config 添加到安装程序?

visual-studio-2010 - 如何使用条件文件复制设置安装程序项目

wix - 如何使用 wix bootstraper 更改 exe 文件的详细信息?