[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 05:36:58 PDT 2016


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


More information about the wix-users mailing list