Passive install launching prerequisite after main feature - Advanced Installer Community
markmahle
Posts: 5
Joined: Tue Sep 23, 2014 5:35 pm

Passive install launching prerequisite after main feature

I built an msi and I need to pause for 20 seconds before the install runs to allow some services to shutdown. To accomplish this I made an exe that waits 20 seconds and then completes. I added this exe as a feature-based pre-requisite and placed it before main in deployment organization. When I run the msi it works great, you see the UI says installing prerequisites and it waits 20 seconds, then the install proceeds. However I am launching this from a script silently by calling command line msiexec.exe /passive /i "msi name". When I do it this way the main install launches and finishes and then I see the prerequisite run. I know it is running after because I get a small window with the file name in it.

I can't figure out what's going on and why running as passive is screwing up the order. Please help!
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Passive install launching prerequisite after main featur

Hello and welcome to Advanced Installer forums,

This is happening because when performing a silent installation, the Feature-Based prerequisites are launched after the main installation. When performing the installation with FULL UI, the Feature-Based prerequisites are launched before the main installation.
Please take a look on the Feature based prerequisites in quiet mode forum thread which debates this subject.

However, I thing that you can have another approach for this. In the Custom Actions page, add the predefined Execute inline script code custom action, as a custom action with sequence.
You can use a code like this to wait for 20 seconds:

Code: Select all

'Msgbox "start" 
sleep1 20 
'MsgBox "stop" 

Sub sleep1(strSeconds) 
       	Dim dteWait : dteWait = DateAdd("s", strSeconds, Now()) 
       	Do Until (Now() > dteWait) 
       	Loop 
End Sub
Schedule the custom action execution according to your scenario. You can take a look on the Windows Installer Standard Actions article which may be useful to you.

You can also take a look on the Using Black Surface theme on startup as a Splash screen forum thread which debates a similar subject.

If there is anything else I can help you with, please let me know.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
markmahle
Posts: 5
Joined: Tue Sep 23, 2014 5:35 pm

Re: Passive install launching prerequisite after main featur

Thanks, I though there was a more straightforward way to pause the install but I couldn't figure it out. I will try your solution and update this post when it's done.
Dan
Posts: 4530
Joined: Wed Apr 24, 2013 3:51 pm

Re: Passive install launching prerequisite after main featur

You're welcome,

Should there be any difficulty you encounter implementing something, please do not hesitate to contact me and I will gladly assist.

Best regards,
Dan
Dan Ghiorghita - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”