Pass parameters from bootstrapper to msi bundle package

前端 未结 2 807
走了就别回头了
走了就别回头了 2020-12-03 10:38

I\'m using VS2010 and WiX 3.6 to create MSI packages and bundle them into Bootstrapper setup. Here\'s my Boostrapper code.



        
相关标签:
2条回答
  • 2020-12-03 11:05

    This has now been implemented and it's available as of the Wix 3.6 RC release on May 21.

    Here is the general idea of how it works:

    <Wix>
    <Bundle>
        <Variable Name="CommandLineArg" bal:Overridable="yes"/>
        <Chain>
          <MsiPackage>
            <MsiProperty Name="CommandLineArg" Value="[CommandLineArg]"/>
          </MsiPackage>
        </Chain>
    </Bundle>
    </Wix>
    

    You have to make a bundle variable that is overridable at the command line and then pass that variable to your msi.

    0 讨论(0)
  • 2020-12-03 11:13

    That is currently not available in the standard bootstrapper: WixStdBa doesn't make the commandline properties available - ID: 3489809

    You can implement such functionality if you create your own bootstrapper application.

    EDIT: Although you can't pass the parameters to your bootstrapper via command line, you can still collect the information in your bootstrapper various ways:

    ex: Setting a variable

    <Variable Name="PARAM1" Value="SomeValue" Persisted="yes" Type="string" />
    

    ex: Searching registry

    <util:RegistrySearch Root="HKLM" Key="Software\SomeProduct" Value="SomeKey" Variable="PARAM1" Result="value"/>
    
    0 讨论(0)
提交回复
热议问题