divyaniP
Posts: 16
Joined: Mon Dec 21, 2020 1:15 pm

Batch file(Custom action) error on next button before installation

Hello,

I have added custom action having a batch file as mentioned in this link: https://www.advancedinstaller.com/user- ... te-ca.html

If I make this custom action with sequence and use run in install execution stage then it runs well.
But when I make this custom action without sequence and trigger it on the next button of any dialog as a published event, then it gives an error like this :

"There is a problem with this windows installer package. A program run as a part of a setup did not finish as expected. Contact your support personnel or package vendor."

I want to run this batch file before installation.
I have added a screenshot of my custom action.
How can I make this custom action run on the next button of the dialog before clicking on the Install button?
Attachments
problem.png
problem.png (74.45 KiB) Viewed 2862 times
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Batch file(Custom action) error on next button before installation

Hello and welcome to our forums,

Most likely, this is happening due to the fact that at the time your custom action is executed, the file is not present on the machine.

In order to work this around, you can add your .BAT file as a temporary file.

Unlike Advanced Installer's regular files or resources, "Temporary Files" are copied on the target machine at the beginning of the installation and are deleted at the end of it, ensuring you have access to them throughout the entire install process.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
divyaniP
Posts: 16
Joined: Mon Dec 21, 2020 1:15 pm

Re: Batch file(Custom action) error on next button before installation

Hello,

Thank you for your help Catalin :)
Now we can execute that batch file.
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Batch file(Custom action) error on next button before installation

You are always welcome! :)

I am glad to hear everything works as expected now.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”