View Full Version : LaunchAppandWait not launching

04-05-2006, 03:28 PM
I have a rather large InstallScript MSI project where I want to launch a different setup program in the OnEnd function. I have the following code; which works perfectly in a test InstallScript MSI project, but for some reason I cannot get it to work in my larger project:

szPath = SRCDIR ^ "Full-Text Indexing";
szProgram = szPath ^ "setup.exe";
LongPathToQuote ( szProgram, TRUE );
MessageBox(szProgram + " -----is the szProgram path", INFORMATION);
szCmdLine = "";
LaunchAppAndWait(szProgram, szCmdLine, LAAW_OPTION_NOWAIT);

Any ideas as to what I can look for in my project that might be keeping the LaunchAppAndWait function from executing?

04-05-2006, 03:47 PM
The LaunchAppAndWait function returns -1

04-05-2006, 06:15 PM
Problem solved:

I added the following code above my previous code which fixed the issue.

ChangeDirectory( SRCDIR );
szPath = SRCDIR;
LAAW_PARAMETERS.lpCurrentDirectory = &Path;