We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

toonetown
Posts: 37
Joined: Wed May 16, 2018 3:46 pm

Launch binary with command-line install

I'm trying to build an installer which launches the installed exe on completion. It appears to work correctly when I run the installer by double-clicking on it...but if I try launching it from using the `msiexec /i path\to\installer.msi` command (getting run using the "SYSTEM" account), the exe doesn't run on completion. How do I launch the executable as the currently-logged-in user after install?
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Launch binary with command-line install

Hello,

Please keep in mind that this could happen because the LocalSystem account is not compatible with UI applications. Therefore if you launch a UI application under LocalSystem account its UI won't be displayed. So, you should avoid launching your setup with Full UI and an UI application at the end of installation when running the installation process under LocalSystem account.

Let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
toonetown
Posts: 37
Joined: Wed May 16, 2018 3:46 pm

Re: Launch binary with command-line install

That does look like what was happening in our case. Thank you!

On a related note, is there a property that I can query (in a custom action or something) that will tell me if the current user has UI access? That is - a condition I could put on my launch application custom action that would only run if that application actually *could* be launched.

And also related - is there a way to query what UI level the installer is running as? For example, if the user is running with “msiexec /silent”, I probably don’t want to pop up my application - but if they are running with “msiexec /passive” or any other UI level, I would want to pop up the application.
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Launch binary with command-line install

You are always welcome.
On a related note, is there a property that I can query (in a custom action or something) that will tell me if the current user has UI access? That is - a condition I could put on my launch application custom action that would only run if that application actually *could* be launched.
I'm not aware of any such dedicated Windows Installer property, but maybe you can try to use the "LogonUser" property to access the name of the user account running the current installation process.
And also related - is there a way to query what UI level the installer is running as? For example, if the user is running with “msiexec /silent”, I probably don’t want to pop up my application - but if they are running with “msiexec /passive” or any other UI level, I would want to pop up the application.
Yes, you can use the UILevel property.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”