I'm having a problem with our MSI package that installs a simple executable and I hope someone can help...
Part of the installation process is a custom action that copies, when present, a file from the source directory (i.e. the directory from where the MSI is located) to the target directory. The custom action is written in C# in an assembly that is compiled to a DLL using WiX Toolkit. The DLL is then attached as a native DLL to the MSI, from which the custom action is called.
In addition to this, the MSI is conditioned so that the application can be installed either for the current user or for all users.
The problem we are having is as follows:
1) A normal domain user (i.e. non administrative privileges) launches the MSI installer.
2) The user selects the "install for all users" option, which means that the application files are written to Program Files.
3) The install button correctly shows with the UAC shield and when clicked, a prompt for credentials is displayed.
4) The installer proceeds normally and the application files are correctly installed (to Program Files) but our custom action fails citing insufficient permissions:
Code: Select all
Unexpected error occurred: Access to the path 'C:\Program Files (x86)\Symprex\Email Signature Manager Agent\agent.ini' was denied.
The same problem occurs if you use "Run As Administrator". However, it does not occur if runas is used (in a command prompt) to launch msiexec to install the package.
Does anybody have any idea why this would be happening? I would have thought that the custom action, being in a DLL, would have the same privileges as the installer. Is there some option that I can change on the custom action to prevent this problem from happening.
TIA,
Ben