我创建了一个托管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