cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
HBindu
Level 3

LaunchAppAndWait not executing

I have an InstallScript Custom Action in a Basic MSI project that calls the LaunchAppAndWait function to execute Net Localgroup method. The install runs successfully, but it doesn't extract the zipped file.

Here is my call:
LaunchAppAndWait ("", szCommandLine, LAAW_OPTION_MAXIMIZED | LAAW_OPTION_WAIT)

Value of szCommandLine is:
C:\Windows\system32\NET localgroup ReportUsers >"C:\Program Files\ACCTGRP.txt"


I have also tried following an it didn't work:
LaunchAppAndWait (szpath, szCommandLine, LAAW_OPTION_MAXIMIZED | LAAW_OPTION_WAIT)


LaunchAppAndWait returns 0, which is no error, but the command doesn't seem to have done anything.

I have tried executing the exact same command from the DOS prompt, and it works fine. I don't understand why it isn't working in InstallShield. Can anyone help as I am totally lost.
Labels (1)
0 Kudos
(3) Replies
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

What is the value of LAAW_PARAMETERS.nLaunchResult after LaunchAppAndWait returns?
0 Kudos
xprt4y
Level 4

If you're on an OS where UAC is present, it is also possible that the installation is writing it somewhere under ProgramData (since you're trying to write to Program Files and it is possibly being redirected to ProgramData).
0 Kudos
RobertDickau
Flexera Alumni

Does it work if you just launch net.exe without redirecting (>) output to a file? If you do need to capture the output in a text file, perhaps see [thread=193982]this thread[/thread].
0 Kudos