Re: [Caml-list] Howto execute a command without the "cmd" windows opening?

2009-11-04 Thread Matthieu Dubuget
Message original Sujet : Re: [Caml-list] Howto execute a command without the "cmd" windows opening? De : Alain Frisch Pour : matthieu.dubu...@gmail.com Date : Wed Nov 04 2009 13:22:01 GMT+0100 (CET) > Matthieu Dubuget wrote: >> Is there any way to run a

Re: [Caml-list] Howto execute a command without the "cmd" windows opening?

2009-11-04 Thread Alain Frisch
Matthieu Dubuget wrote: Is there any way to run a program and get the process status without using cmd.exe ? Did you try Unix.create_process? Alain ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/

Re: [Caml-list] Howto execute a command without the "cmd" windows opening?

2009-11-04 Thread Adrien
That's a bit hackish but you can also try to change the COMSPEC environment variable which points to cmd.exe by default. --- Adrien Nader ___ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Arc

RE: [Caml-list] Howto execute a command without the "cmd" windows opening?

2009-11-04 Thread David Allsopp
> If i find a way to read the exit status of the process… Pass a PROCESS_INFORMATION structure to CreateProcess (in order to get the hProcess for the process you created) and then use GetExitCodeProcess[1]. You can use WaitForSingleObject passing hProcess to it if you need to block until the pr

Re: [Caml-list] Howto execute a command without the "cmd" windows opening?

2009-11-04 Thread Matthieu Dubuget
>> 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.

Re: [Caml-list] Howto execute a command without the "cmd" windows opening?

2009-11-04 Thread Matthieu Dubuget
> 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. > >

RE: [Caml-list] Howto execute a command without the "cmd" windows opening?

2009-11-04 Thread David Allsopp
> 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 bas

[Caml-list] Howto execute a command without the "cmd" windows opening?

2009-11-04 Thread Matthieu Dubuget
Hello, I'm trying to run a separated program from an ocaml program (linked with "-subsystem windows" flexlink option). I'm using mingw flavour of Ocaml. The program to run separately is also an ocaml program, linked with "-subsystem windows". The problem is that a "c:\windows\system32\cmd.exe" w