cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
shodhan
Level 4

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
Level 2

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
shodhan
Level 4

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
Level 4

Yes it works with %d and %s.

thanks
0 Kudos