开发者

Is it possible to send parameters to InstallShield prerequisites?

I am evaluating InstallShield 2010, 开发者_如何学Cand 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?


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="&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>


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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜