-
Notifications
You must be signed in to change notification settings - Fork 7
Consider .bat
and .cmd
files when spawning a process on Windows?
#170
Comments
It's exactly because of the fact that it's a cmd.exe feature, not a CreateProcess feature. You can emulate it by prepending the command with As an aside: the list of extensions isn't hard-coded, it's set by the |
Maybe I am missing something, but:
Is there a reason why libuv does not use Anyway, following the docs is a good enough reason not to allow |
That |
I don't think it is. I just tried it on Windows Vista. (Not with libuv, though, but a "manual" But here it is with node on Windows 8.1:
Am I missing something? Is this some special case and it does not work in general? The internet is full with docs that say that this does not work... |
@libuv/windows Is the above known to you? |
Yes, it's documented here https://github.com/libuv/libuv/blob/2a1b880f5439e074ef4d5c556f626b1044fb6781/src/win/process.c#L304-L308 IIRC, |
@vtjnash well, that says kind of the opposite of what I find. I.e. I found that |
It's also documented here that only
I did some quick local testing too, and seems like it works for me also on Windows 10 and Windows XP however. Though nodejs is also very clear that it should not https://nodejs.org/api/child_process.html#child_process_spawning_bat_and_cmd_files_on_windows (Aside, note that for for reliability, your usage example of nodejs above must set the |
For
filename
libuv currently considers startingfilename
,filename.com
andfilename.exe
when spawning a process on Windows.Is there a reason why
.bat
and.cmd
files are left out? FWIW you can run them in acmd.exe
without specifying the extension, andcmd.exe
looks for them in the.exe
,.bat
,.cmd
order.The text was updated successfully, but these errors were encountered: