views:

216

answers:

1

Hi!

I have an interesting problem. I created a MSI Installer for a .NET 3.5 Application. During the install process I ask the user for a custom folder name where application output files should be stored.

To solve this task I have added a "Textboxes A" user interface item. I assigned TextBox Edit1 a property.

This property I used in "Registry" view to store that path in the registry - that worked. But: I also used this property in the "File System" view to specify the target folder.

The result is: registry is stored correctly. But the installer created always a directory which is named like the default value of the Textbox Edit1. I've changed that name to ensure that there is no place where I could get that value.

I seems that the property is not being updated by the installer UI although the registry value is set correctly.

Does anyone had the same or similar troubles and found a solution/workaround?

Thanks, Arthur

EDIT: If I change the order of the UI Items (Ask for custom folder first, then ask for the target folder) it works. But this is - what should I say - not a solution. It's a sad workaround.

EDIT: With Edit1 I mean the Edit Control 1 of the "TextBox View A" which is bound to the Property "DATAFOLDERPROPERTY".

+1  A: 

A verbose MSI log should tell you more about what exactly is happening. There are two things that jump out at me. One is that your property, Edit1, is not a public property. For it to be public, all letters must be upper-case, e.g. EDIT1. The other is that you are trying to edit a folder location after CostFinalize has set directory locations. To update directories at this time, you cannot merely change their associated properties. You need to add a Set Directory custom action (type 35) to the sequence or a SetTargetPath control event to the dialog - I'd use the control event if possible.

Michael Urman
Thanks! I'll try it. @Edit1: See clarification in my question.
Arthur