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!

slapdash
Posts: 2
Joined: Thu Sep 10, 2015 11:01 am

Launch .exe as administrator from exit dialog

In the exit dialog we've selected an .exe to launch which works fine.
I'd like to know if the .exe can be launched as administrator IF the user has admin access, otherwise launched normally.
I see there's an arguments input box, but I'm struggling to find what I need in the documentation or forum posts. Can anyone help?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Launch .exe as administrator from exit dialog

Hi and welcome to Advanced Installer forums.

In order to achieve this, you can go in the "Custom Actions" page, add a "Launch file" custom action "without sequence", set the "Run as administrator" option for it, then go in the "Dialogs" page, select the "Finish" button from the "ExitDlg" dialog and add the custom action as a published event on that button.

If you want your EXE to be launched as administrator only by using the support from the Exit dialog, you can select the "Run as administrator" option from the "Install Parameters" page, but in this case the whole package will be installed as administrator and it will be changed to an EXE package instead of MSI.

Just let us know if you need more information.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
slapdash
Posts: 2
Joined: Thu Sep 10, 2015 11:01 am

Re: Launch .exe as administrator from exit dialog

Thank you, that worked.
Do you know what will happen if someone without admin access installs the application?
(NB I'm not on a computer that allows me to test this at the mo).
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Launch .exe as administrator from exit dialog

You're welcome. I'm glad it worked.

If someone without admin access tries to install the application, the UAC dialog will prompt him to enter the username and the password from an administrator account that exist on that machine. If he cancel that dialog, the installation/application will be canceled.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”