Classification: Public
Do you want your SETLOCALDB default value to be true or false?
In your bundle.wxs you have it set to true, in your product.wxs you have it set 
to false Have the default value set in the bundle.wxs and get rid of the value= 
in your product.wxs...

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

I'm really at a loss as to why I'm seeing this behavior. Only if I manually run 
setup.exe on the command line with my parameter, as in your example, do I see 
it be able to be picked up by the MSI.

In your email below, I see that you just have some hardcoded values, which is 
really what I want. Even those hardcoded values do not work for me. Perhaps it 
has to do with when the Custom Action for setting the property is firing. I see 
you are doing it after InstallValidate, but I am doing it after InstallFiles.

Mark Freedman
JHU/APL
17-N568
443.778.2647
mark.freed...@jhuapl.edu


-----Original Message-----
From: Steven Ogilvie [mailto:steven.ogil...@titus.com]
Sent: Monday, July 22, 2013 9:49 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] passing command args to MSI from bundle [P]

Classification: Public
Nope the property I have is a made up property that I use... in the bundle.wxs 
I set the default value to WARN which is passed onto the MSI and my custom 
action uses it.
I can change the value via the command line i.e.: MYBootstrapper.exe 
SERVICESLOGLEVEL=DEBUG which would overwrite the default value WARN to DEBUG...

Bundle.wxs:
<Variable Name="SERVICESLOGLEVEL" Type="string" bal:Overridable="yes" 
Value="WARN"/>

<Chain>
...
<MsiPackage Id="MainInstall"
                  DisplayName="$(var.ProductName)"
                  DisplayInternalUI="no"
                  SourceFile="$(env.TLSharedServices)\Installers\_Setup.msi"
                  Name="RedistServerAC\Setup.msi"
                  Visible="no"
                  Cache="no"
                  Compressed="no"
                  Permanent="no">
        <MsiProperty Name="WEBAPPPOOL_USERNAME" Value="NetworkService"/>
        <MsiProperty Name="ALLOW_REMOTE_ACCESS" Value="0"/>
        <MsiProperty Name="SERVICESLOGLEVEL" Value="[SERVICESLOGLEVEL]"/>
        <MsiProperty Name="SERVERLESSINSTALL" Value="1"/>
      </MsiPackage>

Product.wxs:
<Property Id="SERVICESLOGLEVEL" Secure="yes"/>

<CustomAction Id="CA_Set_WebLogLevel" Property="CA_WEBLOGLEVEL" 
Value="[DIRECTORY_PATH_SERVER]|Web.config|[SERVICESLOGLEVEL]"/>
    <CustomAction Id="CA_WEBLOGLEVEL" BinaryKey="BIN_CustomAction" 
DllEntry="ChangeConfigLoggingLevel" Impersonate="no" Execute="deferred" 
Return="check" />
    <UI>
      <ProgressText Action="CA_WEBLOGLEVEL">CA: Configuring the logging level 
for Web.Config...</ProgressText>
    </UI>

<Custom Action="CA_Set_WebLogLevel" After=" InstallValidate">NOT 
Installed</Custom> <Custom Action="CA_WEBLOGLEVEL" After=" InstallFiles ">NOT 
Installed</Custom>

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

Thanks Steven,

I tried that as well, not defaulting the value in the Product.wxs and it seems 
that when the MSI takes over, the value of the property is empty string or 
null. If I do call my setup.exe via commandline, I am able to set it and it 
picks it up in the MSI.  Is your MSI Property in the example below a "built in" 
property, and there's an issue with mine being one I created?

    <Variable Name="SETLOCALDB" Type="string" Value="true" 
bal:Overridable="yes" />
      <MsiPackage Id="OperatorStationInstaller" 
SourceFile="$(var.OperatorStationInstaller.TargetPath)" Compressed="no"    >
        <MsiProperty Name="SETLOCALDB" Value="[SETLOCALDB]" />
      </MsiPackage>


    <Property Id="SETLOCALDB" Secure="yes"/>



Mark Freedman


-----Original Message-----
From: Steven Ogilvie [mailto:steven.ogil...@titus.com]
Sent: Monday, July 22, 2013 9:17 AM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] passing command args to MSI from bundle [P]

Classification: Public
Take out the Value out of your Product.wxs i.e.: <Property Id="SETLOCALDB" 
Secure="yes"  />

Set the default value of the property in the bundle.wxs so it is passed on to 
the MSI, that way you have the default value but you can change it via the 
command line to change it...

-----Original Message-----
From: Freedman, Mark P. [mailto:mark.freed...@jhuapl.edu]
Sent: July-22-13 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


This message has been marked as Public by Steven Ogilvie on July-22-13 9:17:04 
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.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


This message has been marked as Public by Steven Ogilvie on July-22-13 9:49:18 
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.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

 
This message has been marked as Public by Steven Ogilvie on July-22-13 10:45:34 
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.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to