This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: LauchAppandWait
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
Feb 29, 2008
09:35 AM
LauchAppandWait
Hi
I am having a strange problem with LaunchAppAndWait
I have a test.cmd file which is being executed by LaunchAppand Wait as follows
LaunchAppAndWait(SUPPORTDIR^"test.cmd","",LAAW_OPTION_HIDDEN);
The test.cmd file executes a sql script test.sql
sqlcmd.exe -i test.sql -S (local)\sqlexpress
I am able to install SQL express 2005 edition with silent option but am not sure whether my script executes and creates a database.The only way to check is to open SQL management studio and verify.
I believe there is a -o option to out put to log files.
But i am also worried that LaunchAppAndWait is not consistent.
Because it works most of the times but fails somtimes.I need to execute the script silently too.Any ideas or other options or commands that i can use because this is bugging me no end and my whole app is stuck because of this..So any help ASAP shall be appreciated.
I am testing this on Windows XP service pack 2 but on some machines of ( Windows XP service pack 2) it works most of the times but fails some times i dunno why
I am having a strange problem with LaunchAppAndWait
I have a test.cmd file which is being executed by LaunchAppand Wait as follows
LaunchAppAndWait(SUPPORTDIR^"test.cmd","",LAAW_OPTION_HIDDEN);
The test.cmd file executes a sql script test.sql
sqlcmd.exe -i test.sql -S (local)\sqlexpress
I am able to install SQL express 2005 edition with silent option but am not sure whether my script executes and creates a database.The only way to check is to open SQL management studio and verify.
I believe there is a -o option to out put to log files.
But i am also worried that LaunchAppAndWait is not consistent.
Because it works most of the times but fails somtimes.I need to execute the script silently too.Any ideas or other options or commands that i can use because this is bugging me no end and my whole app is stuck because of this..So any help ASAP shall be appreciated.
I am testing this on Windows XP service pack 2 but on some machines of ( Windows XP service pack 2) it works most of the times but fails some times i dunno why
(1) Reply
Mar 03, 2008
11:00 AM
The LaunchAppAndWait function is a wrapper around the Win32 CreateProcess API. You may want to try troubleshooting what the failure is that is occurring. One of the easier ways to do this is to check the LAAW_PARAMETERS.nLaunchResult variable after LaunchAppAndWait returns. If LaunchAppAndWait does not indicate a successful launch, nLaunchResult contains the Win32 error code returned by CreateProcess that indicates why the new process could not be launched. If LaunchAppAndWait does successfully return, nLaunchResult contains the return code from the launched process (obtained through the GetExitCodeProcess API). These return codes might provide some insight into why things are failing.