WiX Burns ApprovedExeForElevation 的安全位置是什么?

What is a secure location for WiX Burns ApprovedExeForElevation?

我尝试让我的标准引导程序在安装后 运行 一个程序。

我让它工作了,但是我 运行 由于安装程序中有 32/64 位程序文件而导致安装位置出现一些问题。我安装的版本取决于 Excel, which is even a UI choice if both bitnesses are installed. Ensuring the installation happens in the correct program files is the easiest with the MSI 文件的位数。但是后来我没有 "LaunchTarget" 变量的位置了。

我在 WiX Burn: Reading LaunchTarget from Registry 中找到了如何从注册表中读取它的方法,并且我可以正常工作,但我现在在 运行ning 上得到了这个:

[1CAC:232C][2015-04-29T12:25:26]i601: Searching registry for approved exe path, key: Software\Microsoft\MyProgram, value: 'MyProgram', win64: no
[1CAC:232C][2015-04-29T12:25:27]i000: The executable path is not in a secure location: C:\myfolder\myprogram.exe
[132C:05CC][2015-04-29T12:25:27]e000: Error 0x80070002: Failed to launch target: myprogram.exe

实现的ApprovedExeForElevation and the WIP页面只讲了'secure location',但是好像没有定义这个。 无论用户将什么作为安装位置,我需要做什么才能使我的 EXE 文件被认为是安全的?

或者是否有另一种方法可以在安装后从注册表中获取此值并且 运行 它没有提升,因为我似乎不需要那个?

来自 WIP,

For now, the Package Cache folder
and the Program Files folder(s) (x86 and x64)
are the only folders considered secure.

无法从注册表获取 LaunchTarget 变量(除非注册表值已在 运行 之前设置,在这种情况下您可以使用 RegistrySearch),需要一个功能请求提交于 http://wixtoolset.org/issues。今天,您需要 BA 提示用户输入安装目录并将其传递到 MSI。