我創建了一個託管CustomAction
將未包含在* .MSI中的2個文件複製到安裝目錄。Wix:將自定義操作中的文件複製到Programm目錄(Windows 7)
雖然這在Windows XP中可用,但它在Windows 7中失敗。雖然日誌說這些文件已複製到所需位置C:\Program Files\MyApp\
,但它們實際上已複製到C:\Users\MyUser\AppData\Local\VirtualStore\Program Files (x86)\MyApp\
。 我的猜測是,這與修改程序文件夾的訪問權限有關。
這是我如何調用WiX的自定義操作:
<CustomAction
Id='InstallSource'
BinaryKey='SrcInstActionDll'
DllEntry='InstallSourceFiles'
Execute='deferred'
Impersonate='no'/>
<CustomAction
Id="InstallSource.SetProperty"
Return="check"
Property="InstallSource"
Value='Files=[SourceDir]$(var.SourceZipName),[SourceDir]$(var.SymbolsZipName);TargetDir=[ParentFolder]'
Execute='immediate'/>
的CustomAction
本身只是調用File.Copy()
。其他由安裝程序複製的文件在Windows 7中完美工作。只有使用CustomAction
複製的文件才具有所描述的問題。
鏈接已死亡FYI – techvice 2015-08-13 17:16:09