Page 1 of 1

Beta.7 UX Launcher fails to wait after launching script

Posted: 07 Aug 2022, 20:42
by TAC109

Code: Select all

@echo off
"Z Bug 2.ahk"
:: "C:\Program Files\AutoHotkey\AutoHotkeyU32.exe" "Z bug 2.ahk"
echo %errorlevel%
pause

Code: Select all

MsgBox
ExitApp 10
(Save the first script as Z Bug 2.cmd and the second as Z Bug 2.ahk both in the same directory.)

Run the Z Bug 2.cmd file as is, in a system where the UX launcher is installed. It will be observed that Z Bug 2.cmd terminates before Z Bug 2.ahk with an errorlevel of 0.

If, in the .cmd file, the second line is commented out and the third line is uncommented so that the launcher is not involved, the Z Bug 2.cmd file waits as expected until the Z Bug 2.ahk has terminated, and shows the correct errorlevel.

A similar problem occurs when a script RunWaits another script and involves the launcher.

Cheers

Re: Beta.7 UX Launcher fails to wait after launching script

Posted: 07 Aug 2022, 22:27
by lexikos
It is by design that the launcher does not wait if the std handles have not been redirected. In most cases, a script is being launched from Explorer and the launcher process does not need to sit around indefinitely.

Re: Beta.7 UX Launcher fails to wait after launching script  Topic is solved

Posted: 26 Nov 2022, 03:51
by lexikos
v2.0-rc.1 changed the behaviour so this should no longer be an issue.