cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
chbiki
Level 6

teach InstallShield about existing msi-package and an .exe file

Hi all,
I need help concernig the start another msi- package and an .exe file.
my release path is:
"C:\InstallShield 2008-Projekte\setup25.10.07\myApplication\PROJECT_ASSISTANT\CDROM_IMAGE\DiskImages\Disk1"
2 Files will be manual added in the CD-ROM together with my release. Now i wish teach InstallShield to do the following: In the same medium there are 2 files (.msi and .exe) which will be started befor the main installation will be started. those 2 files must be exist on the CD and not a part of the main Installation.
I have a Basic msi project. can someone help me.
I appreciate your help, thanks

chbiki
Labels (1)
0 Kudos
(7) Replies
jedimaster_mark
Level 7

You'll want to use Setup Prerequisites for this. You can't run two MSI's at once (Windows Installer won't let you), and nesting them is a deprecated feature and very much not recommended.
0 Kudos
chbiki
Level 6

Hi jedimaster_mark !
thank you for your answer !
First a tried Prerequisites, but here i can only give conditions the main setup depends on. i cant give anywehre, start a .exe file (or .msi file) that already exists in the CD-Root.
When i call the custmer action wizard to create a new custmer action i can give in a pop up the "typ" of such action. I can set the "typ" to "start a further MSI package ". But also here the package must be included in the InstallShield project.

My Problem may be easy:
On the same CD-Root like the setup.exe and .msi there are 2 files an .exe and a .msi. How can i teach Installshield to start such files.
Unfortunately i dont know the solution!

please help me out.
thanks a lot !
chbiki
but i dont know the solution
0 Kudos
chbiki
Level 6

🙂

Hi,
i tried to do it using a InstallScript custmer action. The function LaunchApp() failed because of the wrong path.

Can some one give a suggestion how can i get the setup path (path wehre is setup.exe and .msi). This path will be given to LaunchApp() as argument.

I ´m really need help ! It would be very nice if somone answer me!

Thanks
chbiki
0 Kudos
Thomas_Nguyen
Level 3

chbiki wrote:
🙂

Hi,
i tried to do it using a InstallScript custmer action. The function LaunchApp() failed because of the wrong path.

Can some one give a suggestion how can i get the setup path (path wehre is setup.exe and .msi). This path will be given to LaunchApp() as argument.

I ´m really need help ! It would be very nice if somone answer me!

Thanks
chbiki


In Basic MSI:
1. Create an InstallScript function as follows:

export DVDAppLaunch(HWND);

function DVDAppLaunch(hMSI)
STRING AppPath; // Stores the Path to the Application
NUMBER nBuff; // Buffer size
begin
// Get the SourceDirectory - this directory is where your setup.exe or msi file is being launched

MsiGetProperty(hMSI, "SourceDir", AppPath, nBuff);

// add the directory of the folder and the name of the application to the AppPath variable
AppPath = AppPath + "subdirectory\\App.exe";

// Launch the application
LaunchApplication(AppPath, "", "", SW_SHOWNORMAL, 0, LAAW_OPTION_NOWAIT|LAAW_OPTION_CHANGEDIRECTORY);

end;

2. Create a Custom Action that calls the DVDAppLaunch() function

Hopes that helps! 😄
0 Kudos
chbiki
Level 6

Thanks Thomas Nguyen,
I´ll try it !
0 Kudos
chbiki
Level 6

🙂
Hi Thomas Nguyen,
now it gos fine, i can find the right path and the .exe file had been started.
Many thanks for your help ! Do you know how to set the .exe file to be silent (/s) ?
The .msi file could be unfortunatlly not started perhaps. I started the .msi file after the .exe file in the same function. So while the .exe file runs the .mse file starts and it occurrs the error that another setup is running...
I try it in a separte custmer action.

Thanks
chbiki
0 Kudos
Thomas_Nguyen
Level 3

Sorry that it took me awhile to respond to you. I have my own projects to complete.

It depends on how you want to tackle the execution of the .exe and msi files.

Do you want to execute the .exe file and wait for it to finish executing?
If so, don't use the LAAW_OPTION_NOWAIT, instead use the LAAW_OPTION_WAIT.

You should check the InstallShield's Install Script Language Reference Guide.pdf for more information regarding the LaunchApplication function. If you need more help let me know, but please specify what it is that you are trying to do exactly. Are you trying to launch two executables? If so, it is recommended that you launch one and wait for it to finish before launching another executable. To run the executable silently, it really depends on the kind of executable that you are launching. If the executable is another installshield project that was created, I'm sure there is a silent argument that you can pass to it. If it is a redistributable, you will have to get the command-line arguments reference from Microsoft (or launching the redistributable from the command prompt with the /? argument). Sorry, that I can't help you.

If you meant how you can pass the arguments to the application while launching it.

Here's the syntax for the LaunchApplication:
LaunchApplication( byval string szProgram, byval string szCmdLine, byval string szDirectory, byval number nShowWindow, byval number nTimeOut, byval number nOptions );

I would pass my arguments to the second parameter.

Sincerely,
Thomas
0 Kudos