PDA

View Full Version : LaunchAppAndWait and LAAW_STARTUPINFO



teognost
06-22-2004, 10:24 AM
I have an InstallScript MSI Project and when running my setup I need to launch an MS DOS application.I use LaunchAppAndWait but I need also to record the output generated by this app into the DOS window appearing after the launch.I would like to record everything in a log file but I don't know how to do it.
I suppose I could use LAAW_STARTUPINFO system variable with dwFlags set to STARTF_USESTDHANDLES and then to set somehow hStdOutput member.If you have any idea whether this could help me and how should I use this sys variable-I would be very grateful!Or maybe there is another way to solve my problem...

From IShield Help I didn't understand very much:

"hStdOutput Ignored unless dwFlags specifies STARTF_USESTDHANDLES. Specifies a handle that will be used as the standard output handle to the process if STARTF_USESTDHANDLES is specified. "


Thanks in advance!

Rameshbabu_b
11-10-2004, 10:29 AM
Use the following two lines before you call LaunchAppAndWait(..):

// Hide DOS window
LAAW_STARTUPINFO.dwFlags = LAAW_STARTUPINFO.dwFlags |
STARTF_USESHOWWINDOW;
LAAW_STARTUPINFO.wShowWindow = SW_HIDE;

teognost
11-10-2004, 10:33 AM
thanks a lot!