cancel
Showing results for 
Search instead for 
Did you mean: 
shodhan
Pilgrim

Logging LAAW command in MSI log

Hello,
How can I log the output of LaunchAppAndWait to the default log file that is created after every installation?
I tried this:

SprintfMsiLog("LAAW_TEST:", LaunchAppAndWait (szProgram,szcmdline,WAIT|LAAW_OPTION_HIDDEN));

But it didn't print any thing except this:
"1: LAAW_TEST: "

Any help about this?
Its a basic MSI project btw..

Thanks! :)
Labels (1)
0 Kudos
3 Replies
jay0804
Pilgrim

Re: Logging LAAW command in MSI log

In the first argument of Sprintfmsilog(), you have to specify Format specifier like as below

SprintfMsiLog("LAAW_TEST: %d ", LaunchAppAndWait (szProgram,szcmdline,WAIT|LAAW_OPTION_HIDDEN));
0 Kudos
Highlighted
shodhan
Pilgrim

Re: Logging LAAW command in MSI log

jay0804 wrote:
In the first argument of Sprintfmsilog(), you have to specify Format specifier like as below

SprintfMsiLog("LAAW_TEST: %d ", LaunchAppAndWait (szProgram,szcmdline,WAIT|LAAW_OPTION_HIDDEN));


Okay. I'll try that. Btw, is %d for INTs and %s for strings? If yes, is it ok if I put %s instead of %d, or is it so that LAAW returns only an INT ?
0 Kudos
shodhan
Pilgrim

Re: Logging LAAW command in MSI log

Yes it works with %d and %s.

thanks
0 Kudos