andrewbateman
Posts: 1
Joined: Tue Apr 07, 2009 3:05 am

Vista "Launch file as administrator" problem

My installer needs to bundle an EXE which is a third-party installer (Nero Burning ROM). I have created a custom action under UI Custom Actions, using the "Launch file as administrator" predefined action. No matter what I do I can't seem to get this action to run correctly. I get the following error each time:

"There is a problem with this Windows Installer package. A program required for this install to complete could not be run. Contact your support personnel or package vendor".

From reading posts on this forum, this error indicates to me that the EXE is not being elevated (it requires elevation to run properly). Interestingly if I swap the EXE for another which does not require elevation, everything works OK.

Following are the settings for my custom action:
Launch file as administrator
Type: File attached to installation
Source path: c:\temp\Nero.exe
Command line: [empty]

This action is triggered by a button on the ExitDialog dialog, as it needs to be user-initiated.

Any suggestions?

Andrew
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Vista "Launch file as administrator" problem

Hi Andrew,

Please note that for other software required by your application it is recommended to use prerequisites. The User Guide contains a prerequisite tutorial which may help you.

The error you encountered is shown because the "Launch file as Administrator" custom action is not configured correctly. For more details about how to configure it please see this article. Basically, after adding the predefined UI custom action its settings should be left unchanged and the installer properties used by the custom action should be configured in the "Install Parameters" page.

Please note that a "Launch file as Administrator" custom action can launch only files which are already present on the machine, it cannot use files attached to the installation.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”