我正在使用WiX安裝過程中的編輯控件更新註冊表的值。使用WiX中的編輯控件附加註冊表屬性
我在使用它我使用如下編輯控制沒有問題 -
<Property Id="WIXUI_USERLIST" Value="Demo;" Secure="yes"/>
<Control Id="UsersList" Type="Edit" X="105" Y="192" Width="180" Height="18" Property="WIXUI_USERLIST" Indirect="no" />
能正常工作採取用戶輸入並使用WIXUI_USERLIST在註冊表推值。
當我介紹下面的代碼讀取註冊表的一個屬性顯示在編輯控制現有值並將其安裝到WIXUI_USERLIST作爲<Property Id="USERLIST" Secure="yes">
<RegistrySearch Id="UserList"
Root="HKLM"
Key="[APPLICATIONHIVE]"
Name="UserList"
Type="raw"
Win64="yes" />
</Property>
<SetProperty Id="WIXUI_USERLIST" Value="[USERLIST]" After="AppSearch">USERLIST</SetProperty>
查看日誌提示正確地傳遞給值INSTALL
問題開始階段,但被USERLIST覆蓋。
Action 14:37:22: INSTALL.
Action start 14:37:22: INSTALL.
MSI (s) (78:44) [14:37:22:770]: Running ExecuteSequence
MSI (s) (78:44) [14:37:22:770]: Doing action: FindRelatedProducts
MSI (s) (78:44) [14:37:22:770]: Note: 1: 2205 2: 3: ActionText
Action 14:37:22: FindRelatedProducts. Searching for related applications
Action start 14:37:22: FindRelatedProducts.
MSI (s) (78:44) [14:37:22:772]: Skipping FindRelatedProducts action: already done on client side
Action ended 14:37:22: FindRelatedProducts. Return value 0.
MSI (s) (78:44) [14:37:22:772]: Doing action: AppSearch
MSI (s) (78:44) [14:37:22:772]: Note: 1: 2205 2: 3: ActionText
Action 14:37:22: AppSearch. Searching for installed applications
Action start 14:37:22: AppSearch.
MSI (s) (78:44) [14:37:22:774]: Skipping AppSearch action: already done on client side
Action ended 14:37:22: AppSearch. Return value 0.
MSI (s) (78:44) [14:37:22:774]: Doing action: WIXUI_USERLIST
MSI (s) (78:44) [14:37:22:774]: Note: 1: 2205 2: 3: ActionText
Action 14:37:22: WIXUI_USERLIST.
Action start 14:37:22: WIXUI_USERLIST
MSI (s) (78:44) [14:37:22:775]: PROPERTY CHANGE: Modifying WIXUI_USERLIST property. Its current value is 'Gurinder;TestUser'. Its new value: 'Gurinder'.
Action ended 14:37:22: SetWIXUI_PORTSERVERADD. Return value 1..
在日誌「Gurinder」被安裝到期間存儲在註冊表和編輯「Gurinder;爲TestUser」
工程就像一個魅力! – Gurinder 2013-05-02 15:57:00