[wix-users] Burn: How to pass RegistrySearch result value to Custom Bootstrapper

Farrukh Waheed farrukh1 at gmail.com
Tue Oct 3 03:38:13 PDT 2017


Thanks for quick reply.
But this is simply passing Value = 0 to my Custom Bootstrapper.

On 3 October 2017 at 15:14, Ghenadie Tanasiev via wix-users <
wix-users at lists.wixtoolset.org> wrote:

> Hello,
>
>
> It is not clear, do you want to check if *OceanSoftDir *exists in
> registries, or you actually need to get it's value from the registry, like
> installation path ? If so, *Result  *attribute of the* RegistrySearch *
> element needs to be changed to *value. *In the <Variable> element do not
> use $(var...) but assign a default value, which will be overridden by
> the *RegistrySearch
> *result, if anything will be found.
>
> an example:
>
> <Variable Name="InstallDirPathExists" Value="0"/>
> <util:RegistrySearch Id="InstallDirPathRegSearchExists"
>
>                      Root="HKCU"
> Key="SOFTWARE\$(env.APPNAME)"
> Value="InstallDirPath"
> Result="exists"
> Variable="InstallDirPathExists"/>
> <Variable Name="InstallDir" Type="string" Value="$(env.APPNAME)"
> bal:Overridable="yes"/>
> <util:RegistrySearch Id="InstallDirPathRegSearch"
> Root="HKCU"
> Key="SOFTWARE\$(env.APPNAME)"
> Value="InstallDirPath"
> Result="value"
> After="InstallDirPathRegSearchExists"
> Condition="InstallDirPathExists"
> Variable="InstallDir"/>
>
> Regards,
> Ghenadie
>
>
>
> On Tue, Oct 3, 2017 at 12:57 PM, Farrukh Waheed via wix-users <
> wix-users at lists.wixtoolset.org> wrote:
>
> > In my Bundle code, I'm trying to use the result of a registry search to
> set
> > Variable to be used in my Custom Boostrapper:
> >
> >      <util:RegistrySearch
> >       Id="ThirdPartyInstallDirSearch"
> >       Variable="THIRDPARTY_INSTALL_DIR"
> >       Root="HKLM"
> >       Key="SYSTEM\CurrentControlSet\Control\Session Manager\Environment"
> >       Value="OceanSoftDir"
> >       Result="exists"
> >       />
> >
> >     <Variable Name="THIRDPARTY_INSTALL_DIR" Type="string"
> > Value="$(var.THIRDPARTY_INSTALL_DIR)"/>
> >
> >
> > But this would give an error:
> > Undefined preprocessor variable '$(var.THIRDPARTY_INSTALL_DIR)'
> >
> > Basically, I want to pass the result of registry search to my custom
> > bootstrapper application.
> >
> > Thanks
> >
> > ____________________________________________________________________
> > WiX Toolset Users Mailing List provided by FireGiant
> > http://www.firegiant.com/
> >
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> http://www.firegiant.com/
>


More information about the wix-users mailing list