Browse thread
Howto execute a command without the "cmd" windows opening?
-
Matthieu Dubuget
- David Allsopp
- Alain Frisch
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | David Allsopp <dra-news@m...> |
| Subject: | RE: [Caml-list] Howto execute a command without the "cmd" windows opening? |
> The problem is that a "c:\windows\system32\cmd.exe" windows pops up: > I'd like to avoid this. Both Sys.command and Unix.system use cmd in order to provide command line parsing (it gives the closest equivalent to the Unix version - except for the usual quoting weirdness of cmd as compared to bash!) > I tried Sys.command and Unix.system without success. > > Is there any way to run a program and get the process status without > using cmd.exe ? It's been on my todo list to wrap the CreateProcess Win32 API function[1] in a C stub function - someone else may have done this (possibly in ocaml-win32[2] or something like that), though. The API is very simple (most parameters will be NULL) so the stub would not take long to write. David [1] http://msdn.microsoft.com/en-us/library/ms682425(VS.85).aspx [2] http://caml.inria.fr/cgi-bin/hump.en.cgi?contrib=371