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

时间:2021-04-07 22:39:31

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).

我正在评估InstallShield 2010,并尝试在用户运行时将一些命令行参数设置为SQL Server 2008先决条件。看来前提条件完全在.prq文件(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?

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

3 个解决方案

#1


2  

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.

我们使用IS v12;我为此目的构建了一个.prq文件(它们不为IS v12提供SQL 2008的.prq)。首先,我访问了http://msdn.microsoft.com/en-us/library/ms144259.aspx以获取所有可能的cmd行args。然后我使用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="&lt;ISProductFolder&gt;\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=&quot;NT AUTHORITY\NETWORK SERVICE&quot; /AGTSVCSTARTUPTYPE=Manual /BROWSERSVCSTARTUPTYPE=Automatic /SQLSVCSTARTUPTYPE=Automatic /SQLSVCACCOUNT=&quot;NT AUTHORITY\NETWORK SERVICE&quot; /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=&quot;NT AUTHORITY\NETWORK SERVICE&quot; /AGTSVCSTARTUPTYPE=Manual /BROWSERSVCSTARTUPTYPE=Automatic /SQLSVCSTARTUPTYPE=Automatic /SQLSVCACCOUNT=&quot;NT AUTHORITY\NETWORK SERVICE&quot; /RSSVCSTARTUPTYPE=Automatic"
    />
    <dependencies>
        <dependency File="&lt;ISProductFolder&gt;\SetupPrerequisites\Microsoft Installer 4.5 for XP.prq"/>
        <dependency File="&lt;ISProductFolder&gt;\SetupPrerequisites\Microsoft Installer 4.5 for Windows Server 2003 or 64 bit XP.prq"/>
        <dependency File="&lt;ISProductFolder&gt;\SetupPrerequisites\Power Shell 1.0 for Windows XP.prq"/>
        <dependency File="&lt;ISProductFolder&gt;\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>

#2


2  

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

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

#3


0  

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.

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

#1


2  

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.

我们使用IS v12;我为此目的构建了一个.prq文件(它们不为IS v12提供SQL 2008的.prq)。首先,我访问了http://msdn.microsoft.com/en-us/library/ms144259.aspx以获取所有可能的cmd行args。然后我使用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="&lt;ISProductFolder&gt;\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=&quot;NT AUTHORITY\NETWORK SERVICE&quot; /AGTSVCSTARTUPTYPE=Manual /BROWSERSVCSTARTUPTYPE=Automatic /SQLSVCSTARTUPTYPE=Automatic /SQLSVCACCOUNT=&quot;NT AUTHORITY\NETWORK SERVICE&quot; /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=&quot;NT AUTHORITY\NETWORK SERVICE&quot; /AGTSVCSTARTUPTYPE=Manual /BROWSERSVCSTARTUPTYPE=Automatic /SQLSVCSTARTUPTYPE=Automatic /SQLSVCACCOUNT=&quot;NT AUTHORITY\NETWORK SERVICE&quot; /RSSVCSTARTUPTYPE=Automatic"
    />
    <dependencies>
        <dependency File="&lt;ISProductFolder&gt;\SetupPrerequisites\Microsoft Installer 4.5 for XP.prq"/>
        <dependency File="&lt;ISProductFolder&gt;\SetupPrerequisites\Microsoft Installer 4.5 for Windows Server 2003 or 64 bit XP.prq"/>
        <dependency File="&lt;ISProductFolder&gt;\SetupPrerequisites\Power Shell 1.0 for Windows XP.prq"/>
        <dependency File="&lt;ISProductFolder&gt;\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>

#2


2  

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

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

#3


0  

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.

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