【发布时间】:2021-12-29 12:23:47
【问题描述】:
所以我创建了这个 customAction,它可以让我使用 Registries 获取另一个应用程序的路径
string value = Registry.GetValue(userRoot, key, -1).ToString();
session["INSTALLLOCATION"] = value;
而且它有效。问题是我如何将它发送回 .wxs 文件并将某些东西的安装路径设置为该字符串值。我在 Wix 文件中有这个东西:
<CustomAction Id="CustomAction" Property="CustomAction2" Value="path=[INSTALLLOCATION]" />
<Binary Id="CustomActionBinary" SourceFile="$(var.ProAdmin_TargetDir)ExtractRegistryPath\bin\Debug\ExtractRegistryPath.CA.dll"/>
<CustomAction Id="CustomAction2" Impersonate="no" BinaryKey="CustomActionBinary" DllEntry="CustomAction1" Return="check" Execute="deferred"/>
<InstallUISequence>
<Custom Action="CustomAction" Before="CustomAction2" />
<Custom Action='CustomAction2' Before="ExecuteAction" />
</InstallUISequence>
这个东西会抛出2762错误代码。
【问题讨论】:
标签: wix custom-action wix3 wix3.7 wix3.6