2012-02-29 53 views
1

存在一個已知的錯誤,如果「AlwaysInstallElevated」爲1,將使「在Visual Studio上構建的MSI安裝到C:而不是C:\ Program Files文件」中。7我如何使用Visual Studio設置「SecureCustomProperties」屬性在MSI的「屬性表」?

解決方法和問題已解釋in an MSDN blog。解決的辦法是「將TARGETDIR添加到」屬性表「中的'SecureCustomProperties'屬性中。所有不錯 - 但我該怎麼做?我意識到這並不是一個編程問題,但是至少在搜索網頁時我花了很多時間徒勞。

回答

2

有在Visual Studio部署項目大量bug。很多微軟都將其從Visual Studio的下一個版本中移除,並提供對InstallShield Limited Edition的免費訪問。

的會發現「修理」微星通過VDPROJ人們建造一般寫爲對MSI執行SQL更新按摩表數據postbuild命令運行實用程序。

僞如下...

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" 
+0

所以總結你的答案了:不中VS工作並且必須手動完成,對嗎? – 2012-02-29 12:10:52

+0

沒有手動,(也可以編寫腳本作爲後生成事件),但它肯定有工具以外的地方進行。 – 2012-02-29 14:10:42

+0

我切換到InstallShield限量版。效果很好。 – 2012-02-29 15:57:37

1

您需要使用ORCA,然後更改屬性表如下:

enter image description here

+0

@ 0X0nosugar問題在此期間得到解決 – Wolf 2016-08-10 09:16:14