2
我很努力使這項工作。他們的想法是將一些文件複製到ALLUSERSFOLDER中創建的目錄中,這也需要更改權限。MSI(Wix)創建目錄,更改權限和複製文件
我嘗試使用<CreateFolder>, <util:PermissionEx> and <CopyFile>
但我只是設法讓文件夾中創建和pemissions改變,但不復制(移動)的文件,這裏是XML:
<Directory Id="ProgramFilesFolder">
<Directory Id="APPLICATIONROOTDIRECTORY" Name="MyApp">
<Directory Id="PFSTORAGE" Name="storage"/>
</Directory>
</Directory>
<Directory Id="CommonAppDataFolder">
<Directory Id="ALLUSERSFOLDER" Name="MyApp">
<Directory Id="AUSTORAGE" Name="storage"/>
</Directory>
<Component Id="AllUsersFiles" Guid="{F8765AB2-D78B-4A38-9FF4-DEEC1ACE6509}">
<CreateFolder>
<util:PermissionEx User="Everyone" GenericAll="yes"/>
</CreateFolder>
<CopyFile Id="copy" DestinationProperty="AUSTORAGE" SourceProperty="PFSTORAGE" SourceName="*.*" Delete="yes" />
<RegistryKey Root="HKCU" Key="Software\MyApp\install">
<RegistryValue Value="installing" Type="string" KeyPath="yes" />
</RegistryKey>
</Component>
</Directory>