Reputation: 11
I have this app, its an MSI app using WIX toolset. I faced an issue where when deployed using certain third party software, for example, COMODO one ADDT tool on windows server 2012 R2, where the app will not launch after install. The WIX config is configured to launch an executable after installing via a CustomAction.
I'm aware of "Impersonate=yes", however, Apparently when deploying the MSI, the SYSTEM user account is used which prevents the " Impersonate=yes " from working correctly.
This is how the app is being launched:
<Property Id="WixShellExecTarget" Value="[#appEXE]" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
<InstallExecuteSequence>
<Custom Action="LaunchApplication" After='InstallFinalize'>NOT Installed</Custom>
</InstallExecuteSequence>
Thus the question is, is it possible to launch a "CustomAction" as the logged on user when the MSI is run from the SYSTEM user account?
Upvotes: 1
Views: 244
Reputation: 55571
The impersonate attribute is only going to have an effect for deferred custom actions. Impersonate Yes means run as the user who launched the installer and No means run as SYSTEM.
Custom actions scheduled for immediate execution (outside of the InstallInitialize..InstallFinalize block) are always going to run as the user who launched the installer.
While I'm not familiar with ADDT tool I can say that other software distribution tools such as Microsoft SCCM Server will typically launch the installer as SYSTEM so none of these ends up mattering that much. Impersonate or not you'd be running as SYSTEM.
In these scenarios it doesn't make sense to launch the application at the end of the install. You aren't in the users desktop context and no UI is possible anyways.
Upvotes: 0