fazlurrehman
Posts: 3
Joined: Thu Dec 06, 2018 8:24 am

Call custom action repetitively

Hi,

I am trying to execute a custom action that detects for a Process is Running or Stopped.
But the process is initiated from my AIP project itself, using another custom action.

Currently I am not able to check if the process has stopped or not, automatically.
To achieve it manually, I have set a indeterminate progress bar with a refresh button, which calls the DetectProcess custom action.
Using the Control event, I have hidden the progress bar and enable the next/install button.

I want to get rid of the Refresh button, and automatically enable the next/install button.

Any help would be appreciated.

Thanx.
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Call custom action repetitively

Hello,

I am not sure I understand your scenario here. Could you please give me some more details (maybe exemplify)?

Also, if you could attach some screenshots or even a sample project, that would help me a lot in understanding better what you want to achieve. If you do not want to attach the screenshots or the project to the forum, you can send them over by e-mail at support at advancedinstaller dot com.

Kind regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
fazlurrehman
Posts: 3
Joined: Thu Dec 06, 2018 8:24 am

Re: Call custom action repetitively

Hi Catalin,

I have a bat file, which calls SQL scripts, that restores several databases and creating/copying the tables and initialize data.
This is executed by a custom action without sequence, on a published event of a button on a dialog.

This script execution takes time, and despite having checked "Wait for custom action to finish before proceeding", the installation stage begin which executes another query on the supposedly restored DB.
This results in error saying could not open the DB "mydbname".

I need to ensure that the custom action is complete before the next stage is executed.

In this case, the bat file runs for at least 6 minutes, and there is no window displayed to the end user.
I need to set a property or pause the execution until the bat file finishes its execution.

Will share my AIP file on mail.

Thanx,
-Fazlur
fazlurrehman
Posts: 3
Joined: Thu Dec 06, 2018 8:24 am

Re: Call custom action repetitively

Hi,

I have shared my aip files and the log file.

Please let me know what best can be done.

I need to roll this out by 13 Dec 2018(IST) EOD.

Thanks.
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Call custom action repetitively

Hello Fazlur,

I have tried to have a look over your sent projects today, but unfortunately I was not able to do so due to missing repository dialogs. Can you please also send me the following the following repository dialogs:

OldDBBackupPath.aip
OldDbCheckDlg.aip
RestoreDbsDlg_0.aip

These dialogs should be located at the following path: C:\ProgramData\Caphyon\Advanced Installer\Repository\Dialogs\OldDBBackupPath\[...].aip".

Looking forward to hearing from you.

All the best,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vikasb
Posts: 9
Joined: Thu May 28, 2020 11:20 am

Re: Call custom action repetitively

Hi
I am also trying to execute custom action on button (Next) push.
This custom action runs a bat file.

But I am facing issue while doing this.
It looks like you have done this successfully.
Can you send me the .aip file or sample project to help me out?

Batch file is perfectly fine, there is no issue in it.
Even we tried to run this custom action on Installation stage, with sequence custom action, it works fine.
Looks like the problem is with the trigger from push button.

Please help me out
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Call custom action repetitively

Hello,
But I am facing issue while doing this.
Could you please give me some more details about the encountered issue?
Even we tried to run this custom action on Installation stage, with sequence custom action, it works fine.
If the custom action works as expected when ran from the "Install Execution Stage", the the problem might be the same as in the following thread:

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

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vikasb
Posts: 9
Joined: Thu May 28, 2020 11:20 am

Re: Call custom action repetitively

Hi Catalin

Thanks for help.
It solved my Issue.

Best Regards
Vikas
Catalin
Posts: 6584
Joined: Wed Jun 13, 2018 7:49 am

Re: Call custom action repetitively

You are always welcome, Vikas!

I am glad everything works as expected now.

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

Return to “Building Installers”