4

I have an EditBox controls in the options dialog of the native bootstrapper application:

<Editbox Name="MyEditBox" X="221" Y="151" Width="-100" Height="21" TabStop="yes" FontId="3" />

In the bundle.wxs file, I have:

<Variable Name="MyEditBox" bal:Overridable="yes"/>

Under the element for the MSI to which I want to pass the value entered by the user in the EditBox control, I have:

<MsiProperty Name="FIRE" Value="[MyEditBox]"/>

However, the MyEditBox is not being set and FIRE is being passed to the MSI as a null string. The above methodology was based on this: Customising the WiX Burn theme with additional inputs

It seems what the link above mentions doesn't work for EditBoxes. To get around this I have set DisplayInternalUI="yes" for the MSI. However, I would still like to not show the MSI dialogs and instead pass properties through the WiX BA dialog using EditBox controls. In time I will write a managed BA which can make this work, but I need to get this working using the native BA for now. As per his link: http://www.mail-archive.com/wix-users@lists.sourceforge.net/msg54024.html it would seem that EditBox control can in fact be used to pass properties to MSIs, but I haven't been able to get this to work. Any insight will be appreciated.

UPDATE: I wrote a custom managed bootstrapper which allowed us to get around this issue. As Rob has mentioned there is an extant feature request to implement this in the default BA.

Community
  • 1
  • 1
Manas
  • 521
  • 8
  • 26
  • I am doing exactly what you describe and it works for me with the standard BA, it wasn't documented but it worked ok. The editbox has to be on the options page. – Neil Mar 12 '13 at 21:31
  • @NeilSleightholm Thinking perhaps I was running an older version of WiX which doesn't support this feature, I just upgraded to the latest 3.8 weekly release from stable 3.7 and unfortunately it still doesn't work for me. I am not sure what I am doing different that it works for you but not for me. I do have the editbox in the options page. Even tried on another page, which doesn't work too. – Manas Mar 13 '13 at 05:31
  • Very odd, this has been working for me since 3.6. These are the relevant lines in my code: [Username] – Neil Mar 14 '13 at 21:40
  • @NeilSleightholm Thanks. I did not have the [Username] defined as content text under the Editbox element, as you have. However, even on now defining it as in your sample, it still doesn't work. I am using the WixStandardBootstrapperApplication.RtfLicense standard bootstrapper application. – Manas Mar 15 '13 at 16:09
  • Just tried with RtfLicense and it works for me. – Neil Mar 15 '13 at 19:17
  • 1
    I have put my sample here http://www.x2systems.com/files/BurnEditbox.zip – Neil Mar 15 '13 at 19:31
  • @NeilSleightholm Still no luck. I built your sample and on running got same behavior as what I have been observing so far. A relevant line from the log file: `[26A8:224C][2013-03-15T14:14:17]i301: Applying execute package: Setup, action: Install, path: C:\ProgramData\Package Cache\{697D1929-5069-489E-A4A1-9B198A48B43A}v1.0.0\Redist\Setup.msi, arguments: ' ARPSYSTEMCOMPONENT="1" MSIFASTINSTALL="7" TARGETDIR="C:\Program Files (x86)\ACME" USERNAME="Value of Username variable"'` – Manas Mar 15 '13 at 21:18
  • As you can see, the value of USERNAME is still being passed the default text string even though I entered something totally different in the Username Exitbox. – Manas Mar 15 '13 at 21:21
  • I am running VS 2012. – Manas Mar 15 '13 at 21:21
  • 1
    That is odd I am sure I had it running and now it doesn't! You might want to try this http://wixextba.codeplex.com/ I believe it handles the editbox correctly. – Neil Mar 16 '13 at 08:49
  • @NeilSleightholm Thanks for your assistance on this matter. I ended up writing a custom managed bootstrapper application which solved this, and some other issues as well. Nonetheless, hopefully the default BA will implement this feature sometime in the future. As per Rob's answer here, there is an extant feature request. – Manas May 01 '13 at 07:15

1 Answers1

1

There is a feature request to allow arbitrary edit boxes to have their data stored into Burn variables. As of today, that feature request has not been implemented, although someone has expressed interest in implementing it.

Rob Mensching
  • 33,834
  • 5
  • 90
  • 130