Currently, I have configured Wix_InstallDirDlg to allow the user to install the registry key during installation. There is a special dialog that appears after InstallDirDlg and MaintenanceTypeDlg so that it serves both installation and recovery scripts.
The user dialog box has one text box associated with the property. This property has a registry search, so if the user corrects or updates the previous value, it is saved and therefore is displayed in the user dialog for user verification. The dialog works fine during installation and a registry key is created. However, when restoring, the user dialog appears with the correct registry value entered (therefore, RegistrySearch works), but when the repair is completed, the key value is empty.
<Property Id='SERVER_LISTEN_URL'> <RegistrySearch Id='ServerListenUrlRegSearch' Root='HKLM' Key='SOFTWARE\$(var.Manufacturer)\$(var.Name)' Name='ServerListenUrl' Type='raw' Win64='no' /> </Property> <Component Id="RegistryEntries" Guid="0234974B-6158-4312-90A7-56869809B42E"> <RegistryKey Id="ServerRegKey" Root="HKLM" Key='SOFTWARE\$(var.Manufacturer)\$(var.Name)' Action='createAndRemoveOnUninstall'> <RegistryValue Id="ServerListenUrlRegVal" Name='ServerListenUrl' Value='[SERVER_LISTEN_URL]' KeyPath='yes' Type='string' /> </RegistryKey> </Component> <Dialog Id="SettingsDlg"> <Control Id="ListenUrl" Type="Edit" X="20" Y="100" Width="320" Height="18" Property="SERVER_LISTEN_URL" Indirect="no" /> </Dialog>
What did I do wrong?
caveman_dick
source share