I am creating a WPF customization application with a user interface. I started with a textbook by Brian P. Johnston: http://bryanpjohnston.com/2012/09/28/custom-wix-managed-bootstrapper-application/
Somewhere in my view, I have a simple TextBox that links to the Property InstallationPath in my MainViewModel .
Now I want this path to be used when the user clicks Install. For this, I have a button that binds to my InstallCommand . The following method is called (taken directly from the textbook):
private void InstallExecute() { Bootstrapper.Engine.Plan(LaunchAction.Install); }
How can I make packages to install into the directory of my InstallationPath property?
Edit:
I found a similar question here in Stackoverflow:
Specify SETTING POSITION OF PACKAGES TO WiX INSIDE A BOOT BOOT RECORDED WITH BURN
Reply from Bob Arnson
Use a child MsiProperty for each MsiPackage to specify INSTALLLOCATION = [BurnVariable]. Then use Engine.StringVariables to set BurnVariable.
Now, I think I could access StringVariables in my InstallExecute like this
private void InstallExecute() { Bootstrapper.Engine.StringVariables["BurnVariable"] = InstallationPath; Bootstrapper.Engine.Plan(LaunchAction.Install); }
But where to define this variable? I think somewhere in Product.wxs?
source share