I have an msi that allows the user to conditionally launch the installed application. The msi was created with Wix and includes the following xml statement:
<CustomAction Id='LaunchApplication' FileKey='foo.exe' ExeCommand='' Return="asyncNoWait" Impersonate="yes" />
The msi runs elevated, but the Impersonate option guarantees that the application is launched as the installing user.
The msi is included in my Burn package using the following statement:
<MsiPackage Id="FooMsi" SourceFile="$(var.Installer.TargetPath)" DisplayInternalUI="yes" Vital="yes" Permanent="no" />
However, Burn is elevated before the msi runs and therefore runs the application as Administrator.
Is there an impersonation option for Burn or do I have to launch the application from Burn instead?
Burn launches per-machine packages from an elevated helper process so MSI impersonates the elevated user. There's no way to tell MSI to impersonate another user and/or different permissions. You can use the LaunchTarget attribute of the WixStandardBootstrapperApplication element to launch a process from the unelevated Burn process.