Hi Blair,
Thank you very much!! It works. I set that property in InstallExecute.

On Wed, Jul 17, 2013 at 6:12 PM, Blair Murri <os...@live.com> wrote:

> You need to set the burn variable MyBurnVariable1 to the value of your
> ViewModel's InstallPath property before OnApply()  is called. How you do
> that depends on how your BA is structured.
>
> One option would be to set that property in InstallExecute. Another would
> be to have your ViewModel "bind" the two properties together.
>
> Blair
>
> > Date: Wed, 17 Jul 2013 17:41:07 +0530
> > From: rahul8...@gmail.com
> > To: wix-users@lists.sourceforge.net
> > Subject: [WiX-users] Bootstrapper - Passing Installation Path to
> <MsiProperty> from Text Box in Bootstrapper UI
> >
> > Hi,
> > I am trying to install MSI from Bootstrapper. Install location for that
> msi
> > should be specified from the text box in Bootstrapper UI. I followed this
> > below example. in this example I added a text box for getting install
> > location and I added below code pieces,and MyBurnVariable1 gets the value
> > from the textbox when bootstrapper is loaded for first time through Run
> > method, After the bootstrapper is loaded if I change text box value then
> > start to run the msi MyBurnVariable1 is not assigned with text box value
> > because Run method is not executed now, what should I do to resolve this?
> > I am following the below example.
> >
> http://bryanpjohnston.com/2012/09/28/custom-wix-managed-bootstrapper-application/
> >
> > View
> > <TextBox Height="23" HorizontalAlignment="Left" Margin="153,65,0,0" Name
> > ="textBox2" VerticalAlignment="Top" Width="120" Text="{Binding Path
> > =InstallPath, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>
> >
> > ViewModel
> >
> >
> > private string installPath;
> >
> >         public string InstallPath
> >
> >         {
> >
> >             get { return installPath; }
> >
> >             set
> >
> >             {
> >
> >                 installPath = value;
> >
> >                 RaisePropertyChanged("InstallPath");
> >
> >             }
> >
> >         }
> > Bundle
> >
> > <Variable Name="MyBurnVariable1" bal:Overridable="yes" Type="string"
> Value="
> > C:\Myfolder" />
> >
> >
> >
> >     <Chain>
> >
> >       <PackageGroupRef Id='Netfx4Full' />
> >
> >       <MsiPackage SourceFile="
> > ..\DummyInstaller\bin\Release\DummyInstaller.msi" Id="
> > DummyInstallationPackageId" Cache="yes" Visible="no" >
> >
> >       <MsiProperty Name="INSTALLFOLDER" Value="[MyBurnVariable1]"  />
> >
> >       </MsiPackage>
> >
> >     </Chain>
> > BA
> >
> > public class TestBA : BootstrapperApplication
> >
> >     {
> >
> >         // global dispatcher
> >
> >         static public Dispatcher BootstrapperDispatcher { get; private
> set;
> > }
> >
> >         // entry point for our custom UI
> >
> >         protected override void Run()
> >
> >         {
> >
> >             this.Engine.Log(LogLevel.Verbose, "Launching custom TestBA
> UX");
> >
> >             BootstrapperDispatcher = Dispatcher.CurrentDispatcher;
> >
> >             MainViewModel viewModel = new MainViewModel(this);
> >
> >             viewModel.Bootstrapper.Engine.Detect();
> >
> >             MainView view = new MainView();
> >
> >             view.DataContext = viewModel;
> >
> >
> viewModel.Bootstrapper.Engine.StringVariables["MyBurnVariable1"]
> > = viewModel.InstallPath;
> >
> >             this.Engine.Log(LogLevel.Verbose, "My String from view: " +
> > view.textBox2.Text);
> >
> >             this.Engine.Log(LogLevel.Verbose,"My String from view
> > model: "+ viewModel.InstallPath);
> >
> >
> >
> >             view.Closed += (sender, e) =>
> > BootstrapperDispatcher.InvokeShutdown();
> >
> >             view.Show();
> >
> >             Dispatcher.Run();
> >
> >             this.Engine.Quit(0);
> >
> >         }
> >
> >      }
> >
> > Log details
> >
> > [1DB0:34C4][2013-07-17T17:36:06]i000: Setting string variable
> > 'WixBundleName' to value 'My Test Application'
> > [1DB0:34C4][2013-07-17T17:36:06]i000: Loading managed bootstrapper
> > application.
> > [1DB0:34C4][2013-07-17T17:36:06]i000: Creating BA thread to run
> > asynchronously.
> > [1DB0:2858][2013-07-17T17:36:06]i000: Launching custom TestBA UX
> > [1DB0:34C4][2013-07-17T17:36:06]i100: Detect begin, 2 packages
> > [1DB0:34C4][2013-07-17T17:36:06]i000: Setting string variable
> > 'Netfx4x64FullVersion' to value '4.0.30319'
> > [1DB0:34C4][2013-07-17T17:36:06]i000: Setting string variable
> > 'Netfx4FullVersion' to value '4.0.30319'
> > [1DB0:34C4][2013-07-17T17:36:06]i052: Condition 'Netfx4FullVersion AND
> (NOT
> > VersionNT64 OR Netfx4x64FullVersion)' evaluates to true.
> > [1DB0:34C4][2013-07-17T17:36:06]i101: Detected package: Netfx4Full,
> state:
> > Present, cached: None
> > [1DB0:34C4][2013-07-17T17:36:06]i101: Detected package:
> > DummyInstallationPackageId, state: Absent, cached: None
> > [1DB0:34C4][2013-07-17T17:36:06]i199: Detect complete, result: 0x0
> > [1DB0:2858][2013-07-17T17:36:07]i000: Unsetting variable
> 'MyBurnVariable1'
> > [1DB0:2858][2013-07-17T17:36:07]i000: My String from view:
> > [1DB0:2858][2013-07-17T17:36:07]i000: My String from view model:
> > [1DB0:34C4][2013-07-17T17:36:11]i200: Plan begin, 2 packages, action:
> > Install
> > [1DB0:34C4][2013-07-17T17:36:11]w321: Skipping dependency registration on
> > package with no dependency providers: Netfx4Full
> > [1DB0:34C4][2013-07-17T17:36:11]i000: Setting string variable
> > 'WixBundleRollbackLog_DummyInstallationPackageId' to value
> >
> 'C:\Users\Guest\AppData\Local\Temp\My_Test_Application_20130717173605_0_DummyInstallationPackageId_rollback.log'
> > [1DB0:34C4][2013-07-17T17:36:11]i000: Setting string variable
> > 'WixBundleLog_DummyInstallationPackageId' to value
> >
> 'C:\Users\Guest\AppData\Local\Temp\My_Test_Application_20130717173605_0_DummyInstallationPackageId.log'
> > [1DB0:34C4][2013-07-17T17:36:11]i201: Planned package: Netfx4Full, state:
> > Present, default requested: Present, ba requested: Present, execute:
> None,
> > rollback: None, cache: No, uncache: No, dependency: None
> > [1DB0:34C4][2013-07-17T17:36:11]i201: Planned package:
> > DummyInstallationPackageId, state: Absent, default requested: Present, ba
> > requested: Present, execute: Install, rollback: Uninstall, cache: Yes,
> > uncache: No, dependency: Register
> > [1DB0:34C4][2013-07-17T17:36:11]i299: Plan complete, result: 0x0
> > [1DB0:34C4][2013-07-17T17:36:11]i300: Apply begin
> >
> >
> > Thanks for your help and time!!
> >
> > Regards,
> > Rahul
> >
> ------------------------------------------------------------------------------
> > 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