首页 > 解决方案 > 属性未更新注册表值 高级安装程序

问题描述

我想做一些简单的事情。使用高级安装程序更新注册表值。

The steps I took
1. Create a Property "LWL_KEY_2"
2. Create a Dialog with an Edit Box and set the Property name to "LWL_KEY_2"
3. Bind the Property Name to The Registry Key

日志显示属性获取用户输入

SI (c) (04:28) [14:48:11:280]: PROPERTY CHANGE: Modifying LWL_KEY_1 property. Its current value is 'nick1'. Its new value: 'abc123'.
MSI (c) (04:28) [14:48:23:748]: PROPERTY CHANGE: Modifying LWL_KEY_2 property. Its current value is 'nick2'. Its new value: 'xyz456'.
Action ended 14:48:23: NewSeqDialog. Return value 1.
MSI (c) (04:88) [14:48:23:865]: Doing action: ExitDialog
Action 14:48:23: ExitDialog. 
Action start 14:48:23: ExitDialog.

最终结果是创建了注册表项,但没有任何价值。(如果我设置了一个默认值,该值将被填充到注册表中)

附上截图。

在此处输入图像描述

在此处输入图像描述

标签: advanced-installer

解决方案


Most likely the dialog you use to set the registry property is executed/displayed after the WriteRegistryValues action is executed. This way the registry value is written before the user can input the registry value on your dialog.

To correct this bad design you should add your dialog, in Dialogs view of your advanced installer setup project, anywhere before the ProgressDlg dialog.


推荐阅读