How can I run the application as an administrator after completing Wi-Fi MSI?

How to run an application with administrator privileges after installation is completed using MSI based on WiX?

I can run the application just fine on Windows & XP, but with Windows 7 this is a problem.

The application has a manifest built into it, which says that it should run as an administrator, and I changed the impersonate attribute in Custom Action to "no". I can’t change the execute attribute for the delayed one, since this only works before the InstallFinalize action, and I need it after the user clicks the Finish button in MSI.

This is my usual action:

<CustomAction Id="LaunchApp" FileKey="App" ExeCommand="[Command Line Args]" Execute="immediate" Impersonate="no" Return="asyncNoWait" /> 
+4
source share
1 answer

I could not use WixShellExec because I had to pass command line arguments if certain conditions were true. Therefore, I created my own action that launched exe through the cmd prompt. Hacky, but a viable workaround, and it works without a hitch.

+2
source

Source: https://habr.com/ru/post/1302878/


All Articles