Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

How to run an MSI project from an IS project


6 replies to this topic

bijuishere

bijuishere
  • Full Members
  • 11 posts

Posted 04 March 2006 - 01:50

Hi,

We need a highly customised UI for our install and for this reason we are choosing Install Script project. The application needs Web Service Extentions 2.0 that comes only as msi redistibutable. How can I run this msi from inside the IS project? LaunchAppAndWait is not working, so is DoInstall.

Thanks, B

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 06 March 2006 - 17:20

LaunchAppAndWait should work. How are you calling it, and what are the results (return code from the function, returned exit code from msiexec)?

bijuishere

bijuishere
  • Full Members
  • 11 posts

Posted 07 March 2006 - 04:16

Hi Stefan,

Thanks for the reply.
The return code is -1. I have no idea how to get the exit code out of the MSI. Could you please guide me on this.

Thanks --B

spdygnlz

spdygnlz
  • Full Members
  • 106 posts

Posted 07 March 2006 - 17:17

Are you using the MSIExec function to call your msi? example:

CODE


Sprintf(szParams, "/i %s", "YourMSI.msi");
nResult = LaunchAppAndWait("msiexec.exe", szParams);
if (nResult < 0) then
  Sprintf(szMsg, "The app failed to launch and returned error code %d", LAAW_PARAMETERS.nLaunchResult);
  MessageBox(szMsg, INFORMATION);
endif;



Then you can look up the error code at Microsoft's pages :http://msdn.microsof...error_codes.asp

You can look up msiexec in your InstallShield help to find all of the options available.

Good Luck!



-- spdygnlz --

bijuishere

bijuishere
  • Full Members
  • 11 posts

Posted 07 March 2006 - 19:04

Now it works!!!

I was trying this before. Which was not working
nResult = LaunchAppAndWait("c:\\wse.msi","/q",WAIT);

And I started doing this
Sprintf(szParams, "/i %s", "c:\\wse.msi /q");
nResult = LaunchAppAndWait("msiexec.exe", szParams, WAIT);

Now I see the wse setup launching.

I hope for msi one needs to call then this way. (I didn’t know that)

Anyways Thanks a lot spdygnlz and Stefan . Appreciate it

I posted this question at the InstallShield support and got no reply

Stefan Krueger

Stefan Krueger

    InstallSite.org

  • Administrators
  • 13,269 posts

Posted 07 March 2006 - 19:26

LaunchAppAndWait can only launch executables.

bijuishere

bijuishere
  • Full Members
  • 11 posts

Posted 08 March 2006 - 18:24

Thanks Stefan