Hishiro
Posts: 11
Joined: Fri Jul 07, 2023 4:47 pm

waitting process finish

I guys.
I am testing the packaging of a program consisting of the following files:
Data1.cab
del.cmd
HASPUserSetup.exe
Install.cmd
listfile.cmd
Sentinel Protection Installer 7.6.9.msi
setup.exe
Install.cmd

Code: Select all

@echo off
HASPUserSetup.exe
setup.exe
exit
Del.cmd

Code: Select all

@echo off
del /f /s /q *.*
exit


Add a custom action launch file named: Install.cmd
Execution time = deferred, execution options: wait for custom to finish Add a custom action launch file named: del.cmd
Execution time = deferred, execution options: wait for custom to finish
I want the files to run in sequence: install.cmd first. Since the install.cmd file will call other exe files, the program must wait for it to finish before moving on to the del.cmd file. I have tried many ways but have not succeeded.
If I use Uninstall cleanup, other files will be deleted as soon as the first exe file starts running.

Please help me.
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: waitting process finish

Hello,

From what I can see, Install.cmd launches an executable (which is another installer).

If you execute that on deferred, as you did, we will encounter an error stating that another installation is already in progress. This is happening due to a Windows limitation that does not allow more installation packages to run at the same time (by "run", it means the deferred stage, that modifies the system).

If you want to execute all these files from within an installation package, I would advise adding the files as "temporary files" and then executing them, in order, but on the "Immediate" stage.

Hope this helps!

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Hishiro
Posts: 11
Joined: Fri Jul 07, 2023 4:47 pm

Re: waitting process finish

Catalin wrote: ↑Fri Jan 17, 2025 9:52 am Hello,

From what I can see, Install.cmd launches an executable (which is another installer).

If you execute that on deferred, as you did, we will encounter an error stating that another installation is already in progress. This is happening due to a Windows limitation that does not allow more installation packages to run at the same time (by "run", it means the deferred stage, that modifies the system).

If you want to execute all these files from within an installation package, I would advise adding the files as "temporary files" and then executing them, in order, but on the "Immediate" stage.

Hope this helps!

Best regards,
Catalin
As you mentioned, install.cmd sequentially installs HASPUserSetup.exe and setup.exe of the Sentinel Protection Installer 7.6.9.msi.
I configured:
install.cmd = execution time: deferred, execution options: wait for custom
del.cmd = execution time: deferred, execution options: wait for custom

However, when I tested the installation, the program behaved as follows:
install.cmd runs and invokes HASPUserSetup.exe. The Advanced Installer proceeds to execute del.cmd without waiting for install.cmd to finish. Then it immediately shows the exit finish screen.

This does not meet my expectations.

I want the program to operate as follows:
install.cmd → HASPUserSetup.exe, Setup.exe → wait for the .exe files to finish installing → del.cmd → exit finish.

I attached file. Please guide me on how to configure the Advanced Installer to achieve this.
https://drive.google.com/uc?id=1gHf8MAW ... t=download

The video illustrates my desired programme when using AI. This is an installation exe file that I used other software to create. It works well, however, the customisation is a lot worse than AI. So I want to be able to learn how to use AI to create a similar file.

https://drive.google.com/uc?id=1pHcV03F ... t=download
Catalin
Posts: 7845
Joined: Wed Jun 13, 2018 7:49 am

Re: waitting process finish

Hello Hishiro,

Apologies for the quite delayed reply on this, I somehow overlooked this thread.

Thank you very much for the provided resources.

If possible, could you please also provide the AIP file (Advanced Installer project file) so I can have a look over its' settings?

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

Return to “Building Installers”