Cannot execute .EXE upon Install button press - Advanced Installer Community
CristianYNK
Posts: 5
Joined: Fri Feb 17, 2017 6:56 pm

Cannot execute .EXE upon Install button press

Greetings gentlemen,

I am currently testing Advanced Installer 13.5, and I am having trouble with the following: I cannot get a setup.exe to execute upon the INSTALL button push on the Install Dialog.

As far as I'm concerned, I have to:

1) Create a Custom Action (LaunchFile), in where I specify File To Launch and Command Line..
2) Make sure this custom action is put inside the Wizards Dialogs Stage.
3) In User Interface > Dialogs, and inside the InstallDlg step, create a new Published Event inside my Install Button.
4) Inside the New Control Event window, select Execute Custom Action, and then specify the Argument. and then click ok.

Number 4 is where my problem resides: the OK button is greyed out, and I think it is due to the fact that the Arguments drop down is empty. So I would like to know how to run this .exe file (which is my actual setup.exe) upon the install button press.

Thank you very much for your help!
Cristian
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Cannot execute .EXE upon Install button press

Hello Cristian and welcome to our forums,

I think this happens because your custom action was added as a custom action with sequence. To execute it as a control event the action should be added WITHOUT sequence.

Just go to "Custom Actions" page, select your custom action and from its context menu choose "Sequence -> Whithout Sequence" option. Then try again to configure step 4.

Let us know if you have any questions or doubts.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
CristianYNK
Posts: 5
Joined: Fri Feb 17, 2017 6:56 pm

Re: Cannot execute .EXE upon Install button press

Daniel wrote:Hello Cristian and welcome to our forums,

I think this happens because your custom action was added as a custom action with sequence. To execute it as a control event the action should be added WITHOUT sequence.

Just go to "Custom Actions" page, select your custom action and from its context menu choose "Sequence -> Whithout Sequence" option. Then try again to configure step 4.

Let us know if you have any questions or doubts.

All the best,
Daniel
Good Morning Daniel,

First of all, I thank you for your quick response. It was indeed what I was missing; now the action has been executed correctly. Please advice if I should create a new topic for the next question:

I need to:

1) Check if the folder C:\APPLICATIONS exists. If it does not, then create it.
2) Copy my setup.exe file to it.
3) Run setup.exe from the C:\APPLICATIONS folder.

Regarding step 1, I understand that I have to:

a) Create a New Search under Custom Behavior > Search, which searches for the C:\APPLICATIONS Folder.
b) It is here where I am not understanding: This search must be previous to the install (Launch File) Action, agreed. But how do I get it to check for the folder existence and create that folder if it does not exist?

2) How would I copy a file to the C:\APPLICATION folder? Since that folder will always be there (previously or created by a previous step), this should not be complicated.
3) Run setup.exe from that working directory, that is, from C:\APPLICATIONS folder.

Thank you in advance.

Best regards,
Cristian
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Cannot execute .EXE upon Install button press

Hello Cristian,

There is no need to add a search. You should just go to "Files and Folders" page, create a new folder under the "Windows Volume" directory and simply add your EXE app in there. This way, at install time, if the folder doesn't exist on target machine it will be created.

Finally, to launch your EXE you can use a "Launch file" custom action.

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

Return to “Building Installers”