This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- XCopyFile fails if UAC enabled - Help
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 26, 2011
12:36 PM
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'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.
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 27, 2011
05:36 PM
Where in sequence is your custom action scheduled? Is your installer using setup.exe?
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 28, 2011
04:20 PM
Due to client requirements, I don't have a setup.exe and am launching straight from the MSI.
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 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.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 28, 2011
05:20 PM
Installation is not supposed to make changes to the system during UI Sequence and Immediate Execute Sequence, since there is no rollback when there is an error or user cancels installation. Also, there is no elevation of privileges (please refer to Installation Mechanism). Hence, those system-changing custom actions should be scheduled only in Deferred Execute Sequence and paired with their corresponding rollback custom action.
I would expect files copied by Deferred Custom Action in System Context, i.e., without impersonation, would be owned by SYSTEM.
I would expect files copied by Deferred Custom Action in System Context, i.e., without impersonation, would be owned by SYSTEM.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Apr 29, 2011
12:01 PM
I have a CA that sets file permissions on my install destination. It gives full rights to the Everyone group. After installation, I looked at the Security tab on some of my installed files, and the Everyone group was there and set correctly. But I still couldn't edit the files, still got access denied. When I disabled the UAC I was then able to access everything fine.