I created a managed CustomAction to copy 2 files not included in the *.MSI to the installation directory.
While this works in Windows XP, it fails in Windows 7. Although the log say the files are copied to the desired location, C:\Program Files\MyApp\, they are actually copied to C:\Users\MyUser\AppData\Local\VirtualStore\Program Files (x86)\MyApp\. My guess is that this has to do with access rights to modify the program folder.
This is how I call the custom action in 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'/> The CustomAction itself simply invokes File.Copy(). Other files copied by the installer work perfectly in Windows 7. Only those files copied using the CustomAction have the described problem.