使用 Wix 在注册表值中引用目录安装路径 [英] Reference directory install path in registry value using Wix

查看:31
本文介绍了使用 Wix 在注册表值中引用目录安装路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将使用 wix 安装的应用程序的路径保存在 Windows 注册表中.我尝试了以下方法:

I want to save the path of my application, installed with wix, in the windows registry. I tried the following:

<RegistryValue Root="HKLM" Key="SoftwarecompanyInstallLocation" Value="[#INSTALLLOCATION]" Type="string" Action="write" />

其中 INSTALLLOCATION 是 Wix 中文件夹的目录 ID,但这不起作用.似乎 [#id] 语法仅适用于文件...

where INSTALLLOCATION is the Directory Id of the folder in Wix, but this doesn't work. It seems that the [#id] syntax is only for files...

我看到了以下问题,但他引用的博客似乎已不复存在:

I saw the following question but the blog he references seemingly is no more:

https://stackoverflow.com/questions/521825/saving-install-path-to-注册表

推荐答案

只要去掉 # 符号,只留下 [INSTALLLOCATION] 就可以了.# 符号是指文件键.没有 # 它指的是一个属性和 所有目录都成为属性.有关详细信息,请参阅有关格式化数据类型的文章.

Just remove the # sign, leave only [INSTALLLOCATION] and it should work. The # symbol referes to file keys. Without the # it refers to a property and all directories become properties. See the article about Formatted data type for more details.

这篇关于使用 Wix 在注册表值中引用目录安装路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆