cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Kotiomkin
Level 5

Hide command prompt launched with LaunchAppAndWait

Hi all...

I've a program written in IS2008 (InstallScript project) that use a SQL connection via sqlcmd.exe command.
I launch a few of script files with the LaunchAppAndWait as follow:

retValue = LaunchAppAndWait ( sSQLCMD, sParameters, LAAW_OPTION_WAIT | LAAW_OPTION_USE_CALLBACK | LAAW_OPTION_MINIMIZED );

where sSQLCMD is the SQL Server path for the sqlcmd.exe i.e.
PROGRAMFILES ^ "\\Microsoft SQL Server\\90\\Tools\\Binn\\SQLCMD.EXE ";

and sParameter are the parameter for the execution.

My questions are:
1) Is correct to launch the sqlcmd in this way or there are some OS that doesn't "digest" this way?
2) Is there a way for hide the command prompt launched? In my case infact when setup is running the dos prompt continually open and close (... its look like that the pc is infected...!).

Thanks a lot!

Bye
Labels (1)
0 Kudos
(2) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

This method should be fine for launching any external program.

To hide the command prompt window, have you tried including the LAAW_OPTION_HIDDEN option (instead of LAAW_OPTION_MINIMIZED)?
0 Kudos
Kotiomkin
Level 5

Ok .. thanks .. it works like a charm!

Bye
0 Kudos