
tyler.badorrek1.5524936873975205E12 asked a question.
XCopyFile fails if UAC enabled - Help
I have a Basic MSI I'm installing on Windows 7. I have Require Administrative Privileges set to yes, so only someone with admin rights can install. I have a custom action that uses XCopyFile to copy a file. When UAC is enabled, this action fails and the file is not copied over. If i turn off UAC, it works like a charm.
I'm installing as a user with admin rights, so why is XCopyFile failing with UAC turned on, even at the second lowest setting? I'm not even getting prompted by UAC, the call just returns a failed result.
I run into this issue with all of my CA's scheduled anywhere in the sequence. I did find a way to force my CA's to work by calling them as Deferred in System Context rather than just Deferred. There is no option to do this for immediate actions though, so that's still an issue getting some of them to execute correctly.
Also, any files I install manually through a CA don't have proper permissions. When I try to modify them after install, I get access denied errors, and have to manually change the permissions.
I would expect files copied by Deferred Custom Action in System Context, i.e., without impersonation, would be owned by SYSTEM.