Forward slashes in the "program" argument of Filename.quote_command should be taken as a reason to quote the program path. Otherwise, cmd.exe interprets forward slashes as introducing a flag (eg foo/x is interpreted as foo /x). The issue is exhibited by the following interaction:
$ rlwrap ocaml
OCaml version 4.14.2+LEXIFI
Enter #help;; for help.
# print_endline (Filename.quote_command "a/b.exe" ["x"]);;
"a/b.exe ^"x^""
- : unit = ()
# Sys.command (Filename.quote_command "a/b.exe" ["x"]);;
'a' n’est pas reconnu en tant que commande interne
ou externe, un programme exécutable ou un fichier de commandes.
- : int = 1
#
Here a/b.exe should be quoted (surrounded by double quotes) but it isn't, so cmd.exe think the program name path is a instead of a/b.exe.