[wix-users] Can custom Bootstrapper Application's UI get stored property values from registry using 'remember' pattern?

John Zajac jzajac2 at gmail.com
Wed Jun 15 07:34:55 PDT 2016


re: , but I would set the Value to one of the Burn defined root folders.
Something like:
<Variable Name="InstallFolder" bal:Overridable="yes" Persisted="yes"
Type="string" Value="[ProgramFIlesFolder]Company\" />

I want the install location to be configurable as well, is their a
burn-defined folder for that as well? Or are you saying (in the following
paragraph) that what I am looking to do *is* supported?

As a side note (I will likely bring it up as separate question later) I
still need to use 'remember' pattern in my MSI in order to support those
sys admins who extract the MSI in order to deploy via SCCM or other
deployment tools. Unless I find there is some way for them to use my
bootstrapper exe in their tools and get the same capabilities. Since I have
to do this work in the MSI, I figured it would be better to have my
bootstrapper application rely on the MSI properties being remembered.

The ramblings do help and clears up a lot for me. Now..if I can just get it
to work! If you see any flaws in my markup let me know. Or, if you know
where I can download some source code of a simple MBA which has the same
requirements - gathering user input in a form and persisting the variables
- that would help. I have several examples however none with this.





On Wed, Jun 15, 2016 at 8:45 AM, Phill Hogland <phill.hogland at rimage.com>
wrote:

> I may not be thinking clearly (as I have been sick lately)  but when you
> define in your bundle:
> <Variable Name="InstallFolder" bal:Overridable="yes" Persisted="yes"
> Type="string" Value="[INSTALLFOLDER]" />
>
> What (or where) is INSTALLFOLDER defined.  It is not the same as the
> MsiProperty named INSTALLFOLDER, so if you are expecting it to be linked in
> some why I am not sure how, or I am missing something.  I would use
> Variable/@Persisted='yes' and bal:Overidable='yes' as you have done, but I
> would set the Value to one of the Burn defined root folders. Something like:
> <Variable Name="InstallFolder" bal:Overridable="yes" Persisted="yes"
> Type="string" Value="[ProgramFIlesFolder]Company\" />
>
> In the BA, after reading the Engine Variable 'InstallFolder', any changes
> should be written back to the Engine Variable 'InstallFolder' prior to
> calling Engine.Apply() and Burn will persist those values and load them
> when restarted in a maintenance scenario.
>
> Since my MSIs also include advertised features/shortcuts I find that it is
> also important to implement the Remember-pattern for the MsiProperty in
> order to support MSI's on-demand behavior.  I would not expect a repair of
> my MSI without being driven by Burn, but I still need to have initialized
> Properties available when MSI kicks of a on-demand install of a MSI for
> various reasons.  In this regard my MSI always has a non-advertised Feature
> to which the Remember-Property pattern components are associated so that
> they are installed and available if any other feature which is advertised
> results in an on-demand install.  I have not had any reason to try and get
> the remember-property pattern value by the BA, because the Burn Persisted
> value is the same value and it already has that value.  And my MSIs don't
> have any UI so they do not change the value that was passed to them.
>
> I hope these ramblings may help.  I certainly agree that Burn
> Variable/@Persisted is a very useful feature!
> ________________________________________
> From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of
> John Zajac <jzajac2 at gmail.com>
> Sent: Wednesday, June 15, 2016 7:36:58 AM
> To: WiX Toolset Users Mailing List
> Subject: Re: [wix-users] Can custom Bootstrapper Application's UI get
> stored property values from registry using 'remember' pattern?
>
> Whoops. In case it helps, here it is defined in my Bundle.wxs:
>
>  <Variable Name="InstallFolder" bal:Overridable="yes" Persisted="yes"
> Type="string" Value="[INSTALLFOLDER]" />
>
> <Chain>
>       <MsiPackage SourceFile="$(var.TestPackage.msi"
>                   Visible="no"
>                   >
>
>         <MsiProperty Name="INSTALLFOLDER" Value="[InstallFolder]"/>
>        <MsiPackage />
> <Chain/>
>
> On Wed, Jun 15, 2016 at 7:31 AM, John Zajac <jzajac2 at gmail.com> wrote:
>
> > The Persisted variables don't seem to be working for me. (I'm using
> > v3.10.2.2516)
> > What would this look like in my log (edited for brevity)?
> >
> >
> > [0808:0A48][2016-06-14T14:38:55]i001: Burn v3.10.2.2516, Windows v6.3
> > (Build 9600: Service Pack 0), path: C:\ProgramData\Package
> > Cache\{f5778739-0cec-40ac-b776-085221295863}\testPackage.exe
> > [0808:0A48][2016-06-14T14:38:55]i000: Initializing string variable
> > 'InstallFolder' to value '[INSTALLFOLDER]'
> > [0808:0A48][2016-06-14T14:38:55]i000: Initializing string variable
> > 'Prerequisite' to value ''
> > [0808:0A48][2016-06-14T14:38:55]i000: Initializing numeric variable
> > 'InstallLevel' to value '1'
> > [0808:0A48][2016-06-14T14:38:55]i000: Initializing string variable
> > 'DisableAction' to value '1'
> > [0808:0A48][2016-06-14T14:38:55]i000: Initializing string variable
> > 'DisableServiceControl' to value '1'
> > [0808:0A48][2016-06-14T14:38:55]i009: Command Line: '/uninstall'
> > [0808:0A48][2016-06-14T14:38:55]i000: Setting string variable
> > 'WixBundleLog' to value
> > 'C:\Users\johnz\AppData\Local\Temp\testPackage_20160614143855.log'
> > [0808:0A48][2016-06-14T14:38:55]i000: Setting string variable
> > 'WixBundleManufacturer' to value MyCompany'
> > [0808:0A48][2016-06-14T14:38:55]i000: Loading managed bootstrapper
> > application.
> > [0808:0A48][2016-06-14T14:38:55]i000: Creating BA thread to run
> > asynchronously.
> > [0808:0B3C][2016-06-14T14:39:22]i000: Running the Test BA.
> > [0808:0A48][2016-06-14T14:39:22]i100: Detect begin, 1 packages
> > [0808:0A48][2016-06-14T14:39:22]i101: Detected package: TestPackage.msi,
> > state: Present, cached: Complete
> > [0808:0A48][2016-06-14T14:39:22]i000: Invoking automatic plan for
> uninstall
> > [0808:0B3C][2016-06-14T14:39:26]i000: Creating a UI.
> > [0808:0A48][2016-06-14T14:46:05]i000: Setting string variable
> > 'InstallFolder' to value ''
> > [0808:0A48][2016-06-14T14:46:05]i199: Detect complete, result: 0x0
> > [0808:0A48][2016-06-14T14:46:05]i200: Plan begin, 1 packages, action:
> > Uninstall
> >
> > On Tue, Jun 14, 2016 at 11:56 PM, Rob Mensching <rob at firegiant.com>
> wrote:
> >
> >> Doesn't the Persisted Variables do all the work for you? No need to
> >> remember (unless you want the MSI to be able to repair without
> interaction
> >> from the Bundle... which would be a pretty weird requirement).
> >>
> >> _____________________________________________________________
> >>  Short replies here. Complete answers over there:
> >> http://www.firegiant.com/
> >>
> >>
> >> -----Original Message-----
> >> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On
> >> Behalf Of John Zajac
> >> Sent: Tuesday, June 14, 2016 9:19 PM
> >> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> >> Subject: [wix-users] Can custom Bootstrapper Application's UI get stored
> >> property values from registry using 'remember' pattern?
> >>
> >> I have a custom WiX BA with a custom UI which collects information from
> >> the installing user and stores/retrieves them in the registry using the
> >> 'remember' pattern. With this approach, what is the recommended way for
> >> getting this info back from the registry so that both the BA (for the
> UI)
> >> and the MSI (for custom actions) can have them for Uninstall, Repair,
> >> Modify, etc?
> >>
> >> I am using Variable elements in my bundle, for example:
> >>
> >> <Variable Name="MyProperty" bal:Overridable="yes" Persisted="yes"
> >> Type="string" Value="[MYPROPERTY]" />
> >>
> >> and then MyProperty elements in my Chain\MsiPackage:
> >> <MsiProperty Name="MYPROPERTY" Value="[MYPROPERTY]"/>
> >>
> >> Again, for my MSI, I typically persist user input into RegistryValue
> >> elements and then retrieve their values with RegistrySearch, then feed
> them
> >> back into the property (the 'remember' pattern).
> >>
> >> I based my bootstrapper application off of the WixBA project which calls
> >> Engine.Detect() before showing the UI.
> >>
> >> Or, do I need to have the BA code itself just query the registry?
> >>
> >> ____________________________________________________________________
> >> WiX Toolset Users Mailing List provided by FireGiant
> >> http://www.firegiant.com/
> >>
> >
> >
> >
> > --
> > -John
> >
>
>
>
> --
> -John
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>



-- 
-John



More information about the wix-users mailing list