It seems that if I run setup.exe via the commandline, the MSI Property does get 
forwarded to the MSI, e.g.

Setup.exe SETLOCALDB=true

Mark Freedman


-----Original Message-----
From: Freedman, Mark P. [mailto:mark.freed...@jhuapl.edu]
Sent: Monday, July 22, 2013 8:06 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] passing command args to MSI from bundle [P]

I've tried Steven's method of defining a variable and assigning it to the 
MsiProperty, as well not using a burn variable and just using the MSI Property 
with a constant. When I have the Property defined in my product.wxs, it is 
always set to the defaulted value set in the product.wxs. The value that I set 
in the bundle.wxs doesn't seem to carry over the MSI.

The custom action where I'm setting the custom data property is after 
InstallFiles.


In Bundle.wxs:
    <Variable Name="SETLOCALDB" Persisted="yes" Type="string" Value="true" 
bal:Overridable="yes" />

      <MsiPackage Id="MyInstaller" SourceFile="$(var.MyInstaller.TargetPath)" 
Compressed="no"  >
        <MsiProperty Name="SETLOCALDB" Value="[SETLOCALDB]" />
      </MsiPackage>


Product.wxs
    <Property Id="SETLOCALDB" Secure="yes" Value="false"  />

      <Custom Action="SetUsingLocalDbRegistryAction.SetProperty" 
After="InstallFiles">NOT REMOVE</Custom>
      <Custom Action="SetUsingLocalDbRegistryAction" 
After="SetUsingLocalDbRegistryAction.SetProperty">NOT REMOVE</Custom>

CustomAction.wxs:
    <CustomAction Id='SetUsingLocalDbRegistryAction.SetProperty' Return='check'
          Value='SETLOCALDB=[SETLOCALDB]' 
Property='SetUsingLocalDbRegistryAction'/>

    <CustomAction Id='SetUsingLocalDbRegistryAction' 
BinaryKey='CustomActionBinary' DllEntry='SetUsingLocalDbRegistry'
              Execute='deferred' Impersonate='no' Return='check'/>

Mark Freedman


-----Original Message-----
From: Blair Murri [mailto:os...@live.com]
Sent: Sunday, July 21, 2013 3:07 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] passing command args to MSI from bundle [P]

Mark, you simply need to use an MsiProperty element as a child to your 
MsiPackage one. A burn variable is only involved if you are not hardcoding the 
value you are passing to MSI.

> From: steven.ogil...@titus.com
> To: wix-users@lists.sourceforge.net
> Date: Fri, 19 Jul 2013 18:53:53 +0000
> Subject: Re: [WiX-users] passing command args to MSI from bundle [P]
>
> Classification: Public
> Mark,
>
> In my bundle.wxs I have the following:
>
> </BootstrapperApplicationRef>
>     <Variable Name="SERVICESLOGLEVEL" Type="string"
> bal:Overridable="yes" Value="WARN"/>
>
> <Chain>
> <MsiPackage Id="MainInstall"
>                     DisplayName="$(var.ProductName)"
>                     SourceFile="<path to my MSI file>\MyMSIFile.msi"
>                     Name="Redist\ MyMSIFile.msi "
>                     DisplayInternalUI="yes"
>                     Visible="no"
>                     Cache="no"
>                     Compressed="no"
>                     Permanent="no">
>           <MsiProperty Name="SERVICESLOGLEVEL" Value="[SERVICESLOGLEVEL]"/>
>         </MsiPackage>
>
> This way if I don't have a command line argument the MSI property 
> SERVICESLOGLEVEL is set to WARN by default, hence I can change it by:
> MYBOOSTRAPPEREXE.exe SERVICESLOGLEVEL=DEBUG
>
> Then in my product.wxs file I have the property initialized:
> <Property Id="SERVICESLOGLEVEL" Secure="yes"/>
>
> And then I use that property in a custom action to change the app.config file 
> of my various services logging level i.e.
>
> <CustomAction Id="CA_Set_ConfigLevelStr" Property="CA_SETCONFIGLEVELSTR" 
> Value="[CONFIG_SERVICE_PATH]|Config.exe.config|[SERVICESLOGLEVEL]"/>
>     <CustomAction Id="CA_SETCONFIGLEVELSTR"
> BinaryKey="BIN_CustomAction" DllEntry="ChangeConfigLevel"
> Impersonate="no" Execute="deferred" Return="check" />
>
> So if I don't have a command line parameter to the logging level is set to 
> the default WARN (which is set in my variable element in the bundle.wxs, or I 
> can change the logging level by having a command line parameter as shown 
> above...
>
> Steve
>
> -----Original Message-----
> From: Freedman, Mark P. [mailto:mark.freed...@jhuapl.edu]
> Sent: July-19-13 2:31 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] passing command args to MSI from bundle [P]
>
> Right, My bootstrapper projct creates the exe, and I can run it and install 
> with it. I'm not sure what's happening to the MsiProperty that I"ve set up. 
> I'm not sure how to read it from the MSI installer package, and it isn't 
> passed as a command line argument as shown in the logs.
>
> I thin what I want to do is to read the MSI property and store it in a 
> CustomActionData property to be read by a custom action, but does not seem to 
> work.
>
> Mark Freedman
> JHU/APL
> 17-N568
> 443.778.2647
> mark.freed...@jhuapl.edu
>
>
> -----Original Message-----
> From: Steven Ogilvie [mailto:steven.ogil...@titus.com]
> Sent: Friday, July 19, 2013 1:43 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] passing command args to MSI from bundle [P]
>
> Classification: Public
> The bundle.wxs is the bootsrapper code file, when you compile it, it
> creates an exe
>
> -----Original Message-----
> From: Freedman, Mark P. [mailto:mark.freed...@jhuapl.edu]
> Sent: July-19-13 12:44 PM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] passing command args to MSI from bundle [P]
>
> Currently, I do not have a custom bootstrapper application, just what I have 
> in the Bundle.wxs file.
>
> I thought that by setting up the MSI Property that way, it wouldn't require 
> running the bootstrapper EXE with a command line argument. I just want to 
> pass a hard coded value of some sort to the MSI from this particular 
> bootstrapper to the MSI and read it in a custom action.
>
> I'm trying to then put the MSI property in to a custom action, if it is 
> present, but it doesn't seem to work.
>
>     <CustomAction Id='SetUsingLocalDbRegistryAction.SetProperty' 
> Return='check'
>           Value='SETLOCALDB=[SETLOCALDB]'
> Property='SetUsingLocalDbRegistryAction'/>
>
>     <CustomAction Id='SetUsingLocalDbRegistryAction' 
> BinaryKey='CustomActionBinary' DllEntry='SetUsingLocalDbRegistry'
>               Execute='deferred' Impersonate='no' Return='check'/>
>
>
> Mark Freedman
>
> -----Original Message-----
> From: Steven Ogilvie [mailto:steven.ogil...@titus.com]
> Sent: Friday, July 19, 2013 10:08 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] passing command args to MSI from bundle [P]
>
> Classification: Public
> I do the same thing:
>
> <Variable Name="SERVICESLOGLEVEL" Type="string" bal:Overridable="yes"
> Value="WARN"/
>
> <MsiProperty Name="SERVICESLOGLEVEL" Value="[SERVICESLOGLEVEL]"/>
>
> So from the command line I would run MyBootstrapperEXE.exe
> SERVICESLOGLEVEL=DEBUG
>
> Now if you are just wanting to change a property via the bootstrapper
> you don't have to add the variable element
>
> Just add the MsiProperty element to your MSI:
> <MsiProperty Name="ALLOW_REMOTE_ACCESS" Value="0"/>
>
> Steve
>
> -----Original Message-----
> From: Rahul V [mailto:rahul8...@gmail.com]
> Sent: July-19-13 9:55 AM
> To: General discussion for Windows Installer XML toolset.
> Subject: Re: [WiX-users] passing command args to MSI from bundle
>
> Create a variable inside the Bundle, pass that variable to MsiProperty, and 
> change the variable in the bootstrapper code like 
> Bootstrapper.Engine.StringVariables["MyVariable"] = ""
>
> now you can see it in the log, for the reference,
>
> http://stackoverflow.com/questions/15305932/how-to-pass-a-property-fro
> m-an-editbox-control-in-burn-native-bootstrapper-to-a
>
> http://bryanpjohnston.com/2012/09/28/custom-wix-managed-bootstrapper-a
> pplication/
>
> Regards,
> Rahul
>
> On Thu, Jul 18, 2013 at 6:05 PM, Freedman, Mark P.
> <mark.freed...@jhuapl.edu
> > wrote:
>
> > I'm on Wix 3.7. I have an MSI that I would like to set a registry
> > key (perhaps via a Custom Action, as he will have to check if the
> > key already exists).
> >
> > I'm understand that a Bundle in a bootstrapper project can't change
> > the machine state (such as setting the registry). Therefore, I'm
> > attempting to pass a command line argument via <MsiProperty>, but
> > doesn't appear to show up as a command line argument in my log file for the 
> > bootstrapper.
> >
> >
> > 1.       Is it possible to set a registry key up in a Bundle?
> >
> > 2.       If not, how can I add a command line argument (or some other
> > piece of custom data) to be passed to the MSI.
> >
> > 3.       How can the MSI read whatever it is I pass to it (whether I tends
> > up being a command line arg or something else).
> >
> > <?xml version="1.0" encoding="UTF-8"?> <Wix
> > xmlns="http://schemas.microsoft.com/wix/2006/wi";>
> >   <Bundle Name="MyInstallerBootstrapperLocalDb" Version="1.0.0.0"
> > Manufacturer="$(var.Configuration) Industires" UpgradeCode="*">
> >     <BootstrapperApplicationRef
> > Id="WixStandardBootstrapperApplication.RtfLicense" />
> >     <Chain>
> >       <MsiPackage Id="MyInstallerInstaller"
> > SourceFile="$(var.MyInstallerInstaller.TargetPath)" Compressed="no">
> >         <!-- TODO - if this is being set correctly, the MSI needs to
> > interpret it and set up the key-->
> >         <MsiProperty Name="SetLocalDb" Value="yes"/>
> >       </MsiPackage>
> >     </Chain>
> >   </Bundle>
> > </Wix>
> >
> >
> > Thanks,
> >
> > Mark Freedman
> >
> >
> > --------------------------------------------------------------------
> > --
> > -------- See everything from the browser to the database with
> > AppDynamics Get end-to-end visibility with application monitoring
> > from AppDynamics Isolate bottlenecks and diagnose root cause in seconds.
> > Start your free trial of AppDynamics Pro today!
> > http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg
> > .c lktrk _______________________________________________
> > WiX-users mailing list
> > WiX-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/wix-users
> >
> ----------------------------------------------------------------------
> -------- See everything from the browser to the database with
> AppDynamics Get end-to-end visibility with application monitoring from 
> AppDynamics Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.c
> lktrk _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
> This message has been marked as Public by Steven Ogilvie on July-19-13 
> 10:07:29 AM.
>
> The above classification labels were added to the message by TITUS Message 
> Classification. For more information visit www.titus.com.
>
>
>
>
>
> ----------------------------------------------------------------------
> -------- See everything from the browser to the database with
> AppDynamics Get end-to-end visibility with application monitoring from 
> AppDynamics Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.c
> lktrk _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
> ----------------------------------------------------------------------
> -------- See everything from the browser to the database with
> AppDynamics Get end-to-end visibility with application monitoring from 
> AppDynamics Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.c
> lktrk _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
> This message has been marked as Public by Steven Ogilvie on July-19-13 
> 1:43:16 PM.
>
> The above classification labels were added to the message by TITUS Message 
> Classification. For more information visit www.titus.com.
>
>
>
>
>
> ----------------------------------------------------------------------
> -------- See everything from the browser to the database with
> AppDynamics Get end-to-end visibility with application monitoring from 
> AppDynamics Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.c
> lktrk _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
> ----------------------------------------------------------------------
> -------- See everything from the browser to the database with
> AppDynamics Get end-to-end visibility with application monitoring from 
> AppDynamics Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.c
> lktrk _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
> This message has been marked as Public by Steven Ogilvie on July-19-13 
> 2:53:52 PM.
>
> The above classification labels were added to the message by TITUS Message 
> Classification. For more information visit www.titus.com.
>
>
>
>
>
> ----------------------------------------------------------------------
> -------- See everything from the browser to the database with
> AppDynamics Get end-to-end visibility with application monitoring from
> AppDynamics Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.c
> lktrk _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics Get end-to-end 
visibility with application monitoring from AppDynamics Isolate bottlenecks and 
diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics Get end-to-end 
visibility with application monitoring from AppDynamics Isolate bottlenecks and 
diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to