[Issue 20571] spawnProcess does not find .bat files
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Oct 31 01:45:21 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=20571
torhu at yahoo.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |torhu at yahoo.com
--- Comment #1 from torhu at yahoo.com ---
Since batch files are not executables, but interpreted by cmd.exe, you need to
use spawnShell instead.
Or are you suggesting that files with extensions in PATHEXT should be treated
in a similar way to Linux shell scripts with shebang lines in them? It's a bit
messy to implement that. The Windows ShellExecuteW function will run
non-executables, but it doesn't allow you to set environment variables. So it's
not a generic replacement for CreateProcessW.
--
More information about the Digitalmars-d-bugs
mailing list