是否可以向 InstallShield 先决条件发送参数?

发布于 2024-08-09 06:18:02 字数 205 浏览 2 评论 0原文

我正在评估InstallShield 2010,并尝试在用户运行时将一些命令行参数设置为SQL Server 2008 先决条件。看来先决条件完全在 .prq 文件(xml 样式)中定义。

Wise for Windows 使用 WiseScript 来调用必备安装。 InstallAware 似乎有类似的东西,有自己的脚本。 InstallShield 是否存在类似的东西?

I am evaluating InstallShield 2010, and am trying to set some command line parameters to the SQL Server 2008 prerequisite at user runtime. It appears that the prerequisite is defined entirely in the .prq files (xml-style).

Wise for Windows used WiseScript to call the prerequisite installations. InstallAware seems to have something similar, with their own scripting. Does something similar exist for InstallShield?

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

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

发布评论

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

评论(3

往事风中埋 2024-08-16 06:18:02

我们使用 IS v12;我为此目的构建了一个 .prq 文件(他们不为 IS v12 的 SQL 2008 提供 .prq)。首先我去了 http://msdn.microsoft.com/en-us/ Library/ms144259.aspx 获取所有可能的命令行参数。然后我使用 IS PRQ 编辑器创建基本的 .prq 结构。然后,我手动编辑了 .prq (xml) 文件,以便 (a) 将来轻松进行细微调整,以及 (b) 简化版本控制差异。

    <?xml version="1.0" encoding="utf-8"?>
<SetupPrereq>
    <conditions>
        <condition Type="16" Comparison="2" Path="[ProgramFilesFolder]Microsoft SQL Server\100\COM" FileName="sqlresld.dll" ReturnValue="2007.100.1600.22"/>
    </conditions>
    <files>
        <file LocalFile="<ISProductFolder>\SetupPrerequisites\Microsoft SQL Server 2008 Express with Tools\SQLEXPRWT_x86_ENU.exe" CheckSum="BCC335711D44BAFC420B5165D2F04647" FileSize="0,229169680"/>
    </files>
    <execute file="SQLEXPRWT_x86_ENU.exe" requiresmsiengine="1"
        cmdline      ="/INSTANCEID=AV /INSTANCENAME=AV /ACTION=Install /FEATURES=SQLENGINE,SSMS /HELP=0 /ERRORREPORTING=0 /SQMREPORTING=0 /INDICATEPROGRESS=0 /QUIETSIMPLE=1 /FILESTREAMLEVEL=0 /ENABLERANU=1 /TCPENABLED=1 /NPENABLED=0 /ADDCURRENTUSERASSQLADMIN=1 /AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /AGTSVCSTARTUPTYPE=Manual /BROWSERSVCSTARTUPTYPE=Automatic /SQLSVCSTARTUPTYPE=Automatic /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /RSSVCSTARTUPTYPE=Automatic" 
        cmdlinesilent="/INSTANCEID=AV /INSTANCENAME=AV /ACTION=Install /FEATURES=SQLENGINE,SSMS /HELP=0 /ERRORREPORTING=0 /SQMREPORTING=0 /INDICATEPROGRESS=0 /QUIETSIMPLE=1 /FILESTREAMLEVEL=0 /ENABLERANU=1 /TCPENABLED=1 /NPENABLED=0 /ADDCURRENTUSERASSQLADMIN=1 /AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /AGTSVCSTARTUPTYPE=Manual /BROWSERSVCSTARTUPTYPE=Automatic /SQLSVCSTARTUPTYPE=Automatic /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /RSSVCSTARTUPTYPE=Automatic"
    />
    <dependencies>
        <dependency File="<ISProductFolder>\SetupPrerequisites\Microsoft Installer 4.5 for XP.prq"/>
        <dependency File="<ISProductFolder>\SetupPrerequisites\Microsoft Installer 4.5 for Windows Server 2003 or 64 bit XP.prq"/>
        <dependency File="<ISProductFolder>\SetupPrerequisites\Power Shell 1.0 for Windows XP.prq"/>
        <dependency File="<ISProductFolder>\SetupPrerequisites\Power Shell 1.0 for Windows Server 2003.prq"/>
    </dependencies>
    <properties Id="Microsoft SQL Server 2008 Express with Tools" Description="This installs Microsoft SQL Server 2008 Express Edition (SQL Server Express). The /qn switch suppresses all Setup dialog boxes and error messages. See http://msdn2.microsoft.com/en-us/library/ms144259.aspx for more information about the commad line options. The SQL setup logs to %programfiles%\Microsoft SQL Server\100\Setup Bootstrap\Log\"/>
</SetupPrereq>

We use IS v12; I built a .prq file for the purpose (they don't supply a .prq for SQL 2008 for IS v12). First I went to http://msdn.microsoft.com/en-us/library/ms144259.aspx to get all possible cmd line args. Then I used the IS PRQ editor to create the basic .prq structure. Then I hand-edited the .prq (xml) file for (a) easy minor adjustments in the future and (b) to simplify version control diffs.

    <?xml version="1.0" encoding="utf-8"?>
<SetupPrereq>
    <conditions>
        <condition Type="16" Comparison="2" Path="[ProgramFilesFolder]Microsoft SQL Server\100\COM" FileName="sqlresld.dll" ReturnValue="2007.100.1600.22"/>
    </conditions>
    <files>
        <file LocalFile="<ISProductFolder>\SetupPrerequisites\Microsoft SQL Server 2008 Express with Tools\SQLEXPRWT_x86_ENU.exe" CheckSum="BCC335711D44BAFC420B5165D2F04647" FileSize="0,229169680"/>
    </files>
    <execute file="SQLEXPRWT_x86_ENU.exe" requiresmsiengine="1"
        cmdline      ="/INSTANCEID=AV /INSTANCENAME=AV /ACTION=Install /FEATURES=SQLENGINE,SSMS /HELP=0 /ERRORREPORTING=0 /SQMREPORTING=0 /INDICATEPROGRESS=0 /QUIETSIMPLE=1 /FILESTREAMLEVEL=0 /ENABLERANU=1 /TCPENABLED=1 /NPENABLED=0 /ADDCURRENTUSERASSQLADMIN=1 /AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /AGTSVCSTARTUPTYPE=Manual /BROWSERSVCSTARTUPTYPE=Automatic /SQLSVCSTARTUPTYPE=Automatic /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /RSSVCSTARTUPTYPE=Automatic" 
        cmdlinesilent="/INSTANCEID=AV /INSTANCENAME=AV /ACTION=Install /FEATURES=SQLENGINE,SSMS /HELP=0 /ERRORREPORTING=0 /SQMREPORTING=0 /INDICATEPROGRESS=0 /QUIETSIMPLE=1 /FILESTREAMLEVEL=0 /ENABLERANU=1 /TCPENABLED=1 /NPENABLED=0 /ADDCURRENTUSERASSQLADMIN=1 /AGTSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /AGTSVCSTARTUPTYPE=Manual /BROWSERSVCSTARTUPTYPE=Automatic /SQLSVCSTARTUPTYPE=Automatic /SQLSVCACCOUNT="NT AUTHORITY\NETWORK SERVICE" /RSSVCSTARTUPTYPE=Automatic"
    />
    <dependencies>
        <dependency File="<ISProductFolder>\SetupPrerequisites\Microsoft Installer 4.5 for XP.prq"/>
        <dependency File="<ISProductFolder>\SetupPrerequisites\Microsoft Installer 4.5 for Windows Server 2003 or 64 bit XP.prq"/>
        <dependency File="<ISProductFolder>\SetupPrerequisites\Power Shell 1.0 for Windows XP.prq"/>
        <dependency File="<ISProductFolder>\SetupPrerequisites\Power Shell 1.0 for Windows Server 2003.prq"/>
    </dependencies>
    <properties Id="Microsoft SQL Server 2008 Express with Tools" Description="This installs Microsoft SQL Server 2008 Express Edition (SQL Server Express). The /qn switch suppresses all Setup dialog boxes and error messages. See http://msdn2.microsoft.com/en-us/library/ms144259.aspx for more information about the commad line options. The SQL setup logs to %programfiles%\Microsoft SQL Server\100\Setup Bootstrap\Log\"/>
</SetupPrereq>
内心激荡 2024-08-16 06:18:02

是 - 右键单击​​ SQL Server 先决条件 -> “要运行的应用程序”选项卡 -> “指定应用程序的命令行”。

Yes - by right clicking on the SQL Server prerequisite -> "Application to Run"' tab -> "Specify the command line for the application".

青春有你 2024-08-16 06:18:02

我知道如何执行此操作的唯一方法是编写 PRQ 调用的 Helper.EXE。 EXE 需要检测 Windows 设置并以静默方式将正确的参数传递给真正的 Prereq EXE/MSI。

The only way I know how to do this is to write a Helper.EXE that the PRQ calls. The EXE would need to detect the windows settings and silently pass the correct arguments to the real Prereq EXE/MSI.

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