Gary
Posts: 11
Joined: Tue Nov 03, 2009 8:58 pm

How to conditionaly run a second setup program

Hi,

Is there a tutorial someplace that tells how to run a second setup program from the first setup based in the conditional inclusion of a Feature?

In this case I have two such features:

1. A set of drivers for the hardware associated with my product.
2. The Adobe Acrobat Read the is needed for certain functions of my product. (I already have a license from Adobe to redistribute this.)

Gary
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: How to conditionaly run a second setup program

Hello,

If the packages you are trying to install are .msi's then you could look into using Chained Packages. Otherwise the only way to conditionally launch the installers would be during InstallFinalize by using a "Launch File or Open URL" or an "Attached Custom Action". This is because two msi based installs can not run at the same time.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Gary
Posts: 11
Joined: Tue Nov 03, 2009 8:58 pm

Re: How to conditionaly run a second setup program

Hi,

Both setups are .exes from third parties so I chose the launch file.

The driver install works perfectly.

However, the adobe reader fails with a file not found error:

The system cannot find the file specified.

File: D:\WINNT\Installer\MSIA0E.tmp.exe
Info ID: 2.1240.03.2.20020
Please send the Info ID and file name to http://www.adobe.com/misc/bugreport.html

Is there a setting I'm missing or can't this package be installed as an option of my package?

We want to offer the reader as a convince since it's needed by our software.

BTW, I have obtained redistribution permission for the reader and this, AdbeRdr90_en_US_Std.exe, is the file they provided to me to include.

Gary
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: How to conditionaly run a second setup program

Hi Gary,

Most likely the Adobe installer has some problems when launched through a custom action during another install. Starting with Advanced Installer 7.3 you can add the packages as feature-based prerequisites. This way they should be installed without a problem.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Gary
Posts: 11
Joined: Tue Nov 03, 2009 8:58 pm

Re: How to conditionaly run a second setup program

HI,

That looks like that should work, but it's not working.

I have setup two Software Prerequisites, JRE 1.6 and Acrobat Reader 9.0, and neither one of them install.

I guess I must be missing something???

I have gone over the page you referenced a few times but my settings seem to match what it says. (Basically go with the defaults for the predefined prerequisites.)

Do you have a sample that I could look at?

Gary
Gary
Posts: 11
Joined: Tue Nov 03, 2009 8:58 pm

Re: How to conditionaly run a second setup program

Hi,

I think I solved the acrobat one.

I created a small sample to install notepad and set Acrobat as a software prerequisite. It worked.

But I still couldn't see any differences in my setup. So, I deleted mine and rebuilt it from scratch. Then it worked.

My guess is when I upgraded to 7.3 it didn't upgrade my aip file properly.

But I'm still having problems with the Java Runtime.

The built in prerequisite has a url.

Should it open a browser for me to download and run a setup? Should it download a file and run it on it's own?

It's not doing either???

Gary
Gary
Posts: 11
Joined: Tue Nov 03, 2009 8:58 pm

Re: How to conditionaly run a second setup program

Ok,

Found the problem. Needed to set the minimum version to 1.6. I had a 1.3 version on my machine.

Now I it opens a DOS window and gives me this error:

---------------------------
16 bit MS-DOS Subsystem
---------------------------
D:\DOCUME~1\gwardell\APPLIC~1\COURTT~1\TrueBond\install\WWWJAV~1.COM
The NTVDM CPU has encountered an illegal instruction.
CS:062d IP:0384 OP:2e 63 6f 6d 3a Choose 'Close' to terminate the application.
---------------------------
Close Ignore
---------------------------


I still think I'm not fully understanding how to set this up???

Anyone have a working sample to share?

Gary
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: How to conditionaly run a second setup program

Hi Gary,

I am afraid I do not have a working sample for this. However the error you are describing seems like corruption occurred during the download process. You could try using the integrity check using MD5 that can be set for each Prerequisite to make sure the file downloaded correctly.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
Gary
Posts: 11
Joined: Tue Nov 03, 2009 8:58 pm

Re: How to conditionaly run a second setup program

GabrielBarbu wrote:Hello,

If the packages you are trying to install are .msi's then you could look into using Chained Packages. Otherwise the only way to conditionally launch the installers would be during InstallFinalize by using a "Launch File or Open URL" or an "Attached Custom Action". This is because two msi based installs can not run at the same time.

Regards,
Gabriel
Hi,

Maybe I'm not doing something right.

I made the acrobat setup a prerequisite and it works fine, I think.

The other is an Install Shield setup with an ini file and compiled script.

It is a set of drivers for a piece of USB hardware that my app needs. It's provided by a third party.

I added all of these files to my Application Folder. (Which is actually a nice feature in case the user has to rerun the driver setup.)

However, when I use the "Launch File or Open URL" action it doesn't run. I spent a couple hours trying to figure out why and only came up with the action was returning a "1".

But I recalled that earlier I was able to run a .bat file so I poked around and tried to remeber how I did that. What I came up with was the "EXE with working directory". That action is able to launch the setup.exe for the drivers and it seems to run ok. The path is [#setup.exe] and I have this as my expression: (&Drivers = 3) AND NOT (!Drivers = 3) Everything else is default.

Is that how I want to do this?

This all (not only this piece but the whole setup, it's only copying files to certain places and running a couple third party packages.) seems like it should be so simple. I'm amazed that it has taken so long to get working. Might have been easier, but not so elegant, to use a .bat file.

Gary
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: How to conditionaly run a second setup program

Hello Gary,
However, when I use the "Launch File or Open URL" action it doesn't run. I spent a couple hours trying to figure out why and only came up with the action was returning a "1".
This did not work because the setup was not yet on the disk when "Launch File or Open URL" executed.
But I recalled that earlier I was able to run a .bat file so I poked around and tried to remeber how I did that. What I came up with was the "EXE with working directory". That action is able to launch the setup.exe for the drivers and it seems to run ok. The path is [#setup.exe] and I have this as my expression: (&Drivers = 3) AND NOT (!Drivers = 3) Everything else is default.

Is that how I want to do this?
That indeed is a valid approach. You could also try adding your driver setup as a prerequisite along with its needed files.
This all (not only this piece but the whole setup, it's only copying files to certain places and running a couple third party packages.) seems like it should be so simple. I'm amazed that it has taken so long to get working. Might have been easier, but not so elegant, to use a .bat file.
Batch files can be troublesome since they do not register your product with Windows Installer. Problems and shortcomings result from this.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”