WIX - ввод текста в процессе установки
От: DS Украина  
Дата: 05.03.05 11:18
Оценка:
Для построения msi файла установки используется WIX 2.0.2613.0.

Необходимо в процессе подготовки к установке предоставить пользователю возможность ввести некоторый параметр конфигурации устанавливаемой программы. Для этого создан диалог содержащий edit для ввода, с property указаным в качестве value при добавлении в реестр.

Проблема:
Если Property связать с Edit Control и с Value для Registry, введенное значение в реестр не попадает.

Далее основные моменты WXS файла:


<Product ...>

   <Package ... />

   <Property Id="Some_Property">Default Value</Property>

   ...

   <Directory Id="TARGETDIR" Name="SourceDir">
      ...
      <Component Id="WPMCClient" Guid="11111111-1111-1111-1111-111111111111">
         ...
         <Registry Id="some_id" Root="HKLM" Key="SYSTEM\...\SomeKey" Name="SomeParam" Type="string" Value="[Some_Property]"/>
         ...
      </Component>
      ...
   </Directory>

   <UI>
      <Dialog Id="Dlg1"...>
         <Control Id="ParamEdit" Type="Edit" ... Property="Some_Property" />
      </Dialog>
      <Dialog Id="Dlg2"...>
         <Control Id="ParamText" Type="Text" ...>
            <Text>Param: [Some_Property]</Text>
         </Control>
      </Dialog>
      ...
   </UI>

</Product>



Dlg2 показывается после Dlg1 и Control с Id="ParamText" содержит корректное значение введенное в ParamEdit.
Но при добавлении в реестр Value для Registry всегда устанавливается в "Default Value" и не изменяется после ввода в диалог. Каким образом заставить заносить правильное значение в реестр
Re: WIX - ввод текста в процессе установки
От: DS Украина  
Дата: 05.03.05 13:57
Оценка:
Проблема была в имени для property.
После замены имени на "EDIT1" проблема решилась.
К сожалению объяснения такого поведения пока не нашел.
Re[2]: WIX - ввод текста в процессе установки
От: DS Украина  
Дата: 05.03.05 14:50
Оценка: 2 (1)
А вот и объяснение:


Platform SDK: Windows Installer: About Properties


Private Properties

Private properties are used internally by the installer and their values must be entered into the database by the author of the installation package or set by the installer during the installation to values determined by the operating environment. The only way a user can interact with private properties is through Control Events in the package's authored user interface. Private property names must include lowercase letters.


Public Properties

Public properties can be authored into the installation database in the same way as private properties. In addition, the values of public properties can be changed by a user or system administrator by setting the property on the command line, by applying a transform, or by interacting with an authored user interface. Public property names cannot contain lowercase letters.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.