如何使用Visual Studio在MSI的“属性表”中设置“SecureCustomProperties”属性?

时间:2012-02-29 10:21:11

标签: visual-studio windows-installer setup-deployment

如果“AlwaysInstallElevated”为1,则有一个已知错误会导致“在Visual Studio中构建的MSI安装到C:而不是C:\ Program Files”,如果“AlwaysInstallElevated”为1。

解决了解决方法和问题in an MSDN blog。修复是“在'属性表'中将TARGETDIR添加到'SecureCustomProperties'属性”。一切都很好 - 但我怎么能这样做?我知道这不是一个编程问题,但是到目前为止,我在搜索网页时花了很多时间。

2 个答案:

答案 0 :(得分:2)

Visual Studio部署项目中存在很多错误。微软正在从Visual Studio的下一个版本中删除它,并提供免费访问InstallShield Limited Edition。

将找到“修复”由VDPROJ构建的Msi的人们通常会编写作为postbuild命令运行的实用程序,这些命令在MSI上执行SQL更新以按摩表数据。

伪代码跟着......

select Value from Property where Property.Property = "SecureCustomProperties"

strings.split ";" into collection

if collection not contains "TARGETDIR" add "TARGETDIR" to collection

collection serialize using ; to string

update Property set Value = newstring where Property.Property = "SecureCustomProperties"

答案 1 :(得分:1)

您需要使用ORCA,然后按如下所示更改属性表:

enter image description here