TurboFisch
Level 7

launchappandwait faiing on windows 10

It appears that LaunchAppAndWait is failing for me when I try to execute a batch file on windows 10. Basically, doing this:

if (SYSINFO.WINNT.bWinXP != TRUE) then
LAAW_SHELLEXECUTEVERB = "runas";
endif;
nOptions = nOptions|LAAW_OPTION_HIDDEN|LAAW_OPTION_SHOW_HOURGLASS|LAAW_OPTION_WAIT|LAAW_OPTION_USE_SHELLEXECUTE;
SetStatusWindow (-1, szProgram+"("+szCmdLine+")");
nResult = LaunchAppAndWait (szProgram, szCmdLine, nOptions);
Labels (1)
0 Kudos
2 Replies
chad_petersen
Level 9

Sounds like they have a bug on Windows 10 - But, just for a test I would sure try InstallShield 2016 SP2 in this case and see if it makes any difference. I'm not sure if anyone would have formally tested InstallShield 2015 on Windows 10 prior to InstallShield 2015 shipping - certainly something like that could have been missed.

Chad
0 Kudos
TurboFisch
Level 7

even with installshield 2016, I had to change my args from:

somebatch.cmd

to

cmd /c somebatch.cmd

because of this I lose my errorlevel, which makes it difficult to know if I need to reboot or not.

my batch file is used to install a device driver that call dpinst. I have tried using the device driver settings in the component before, but it wasn't working because we have a single driver that does both x32 & x64. the installshield seemed to be using the last setting entered.

I haven't tried sp2, maybe that fixes the problem.
0 Kudos