Don’t know what I was doing wrong, but since you guys said it should work I 
tried again, and it did.

Thanks very much - that really simplifies things!
David

> On Apr 12, 2015, at 7:52 PM, Sean Hall <r.sean.h...@gmail.com> wrote:
> 
> This should just work.  I'm guessing you've put the Variable in a Fragment
> that isn't getting pulled in.  Does the variable show up at the end of the
> log?
> 
> On Fri, Apr 3, 2015 at 5:17 PM, roberthyang <robert_y...@agilent.com> wrote:
> 
>> This worked fine for us inside OnDetectComplete on Wix 3.8 (released
>> version).  For example :
>> 
>>        // Check if Acrobat is installed by reading variable.
>>        LPWSTR sczAcrobatValue = NULL;
>>        BalGetStringVariable(L"AcrobatInstalled", &sczAcrobatValue);
>>        BalExitOnFailure(hr, "Failed to get AcrobatInstalled burn
>> variable.");
>> 
>>        // Show warning state if Acrobat variable is empty.
>>        if ((sczAcrobatValue == NULL) || (wcslen(sczAcrobatValue) == 0))
>>        {
>>             hr = m_pEngine->SetVariableString(L"AcrobatWarningState",
>> L"");
>>             BalExitOnFailure(hr, "Failed to set AcrobatWarningState burn
>> variable.");
>>        }
>> 
>> AcrobatInstalled is read using Util: registry searches, and
>> AcrobatWarningState just controls visibility of a warning text box in our
>> custom theme.  What specifically "doesn't work" ?
>> 
>> 
>> David Burson wrote
>>> In the bundle I’ve tried
>>> <Variable Name="MyVariable" Value="MyValue" />
>>> , and tried reading it in bafunctions.dll with
>>>    LPWSTR my_variable = NULL;
>>>    BalGetStringVariable(L"MyVariable", &my_variable);
>>> 
>>> But that doesn’t work.  Is there any way to do it?
>>> 
>> ------------------------------------------------------------------------------
>>> Dive into the World of Parallel Programming The Go Parallel Website,
>>> sponsored
>>> by Intel and developed in partnership with Slashdot Media, is your hub
>> for
>>> all
>>> things parallel software development, from weekly thought leadership
>> blogs
>>> to
>>> news, videos, case studies, tutorials and more. Take a look and join the
>>> conversation now. http://goparallel.sourceforge.net/
>>> _______________________________________________
>>> WiX-users mailing list
>> 
>>> WiX-users@.sourceforge
>> 
>>> https://lists.sourceforge.net/lists/listinfo/wix-users
>> 
>> 
>> 
>> 
>> 
>> --
>> View this message in context:
>> http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/how-to-define-a-custom-variable-in-bundle-wxs-and-get-its-value-in-BAFunctions-dll-tp7599844p7599846.html
>> Sent from the wix-users mailing list archive at Nabble.com.
>> 
>> 
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming The Go Parallel Website,
>> sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub for
>> all
>> things parallel software development, from weekly thought leadership blogs
>> to
>> news, videos, case studies, tutorials and more. Take a look and join the
>> conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> WiX-users mailing list
>> WiX-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wix-users
>> 
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to