[wix-users] [WIX]: How to run *.exe (which was launched by MSI) under current user account

Dileep S dileep.sanampudi at gmail.com
Tue Apr 5 00:18:17 PDT 2016


I have created an MSI package using WIX 3.7

Required the below options.

1) MSI package should display UAC prompt before extracting files.

2) *.exe file should launch after extracting the files.

3) *.exe should run under current user account.

Case1: Following syntax used in WIX script file to launch an EXE.

> <Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine"
> InstallPrivileges="elevated" />
> <CustomAction Id="InstallDRV" Directory="INSTALLDIR" Execute="deferred"
> ExeCommand="MyApplication.exe" Impersonate="no" Return="asyncNoWait" />​​

Observation:

*.exe is running under Local System account.

Case2: Following syntax used in WIX script file to launch an EXE.

> ​<Package InstallerVersion="200" Compressed="yes" InstallScope="perUser"
> InstallPrivileges="limited" />
> <CustomAction Id="InstallDRV" Directory="INSTALLDIR" Execute="immediate"
> ExeCommand="MyApplication.exe" Impersonate="yes" Return="ignore" />​​

Observation:

1) UAC prompt is not displayed

2) *exe is not launched.

Case3: Following syntax used in WIX script file to launch an EXE.

> ​<Package InstallerVersion="200" Compressed="yes"
> InstallScope="perMachine" InstallPrivileges="elevated" />
> <CustomAction Id="InstallDRV" BinaryKey="SampleCA"
> DllEntry="CustomAction1" Execute="immediate"  Impersonate="yes"
> Return="ignore" />​​

Observation:

1) *.exe is running as local system account.


How to resolve this issue?

Regards,

Dileep


More information about the wix-users mailing list