* [Caml-list] sys command
@ 2012-02-08 16:53 Fady Nassif
2012-02-08 18:18 ` Andrej Bauer
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Fady Nassif @ 2012-02-08 16:53 UTC (permalink / raw)
To: caml-list
Hello,
Does anyone know how I can launch a batch file from Ocaml without pop up
windows.
Thanks
Fady
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] sys command
2012-02-08 16:53 [Caml-list] sys command Fady Nassif
@ 2012-02-08 18:18 ` Andrej Bauer
2012-02-08 21:12 ` oliver
2012-02-08 18:21 ` Paolo Donadeo
2012-02-08 18:49 ` Ouchet Florent
2 siblings, 1 reply; 6+ messages in thread
From: Andrej Bauer @ 2012-02-08 18:18 UTC (permalink / raw)
To: Fady Nassif; +Cc: caml-list
> Does anyone know how I can launch a batch file from Ocaml without pop up
> windows.
<troll>Use an operating system which does not contain the word
"windows" in its name?</troll>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] sys command
2012-02-08 16:53 [Caml-list] sys command Fady Nassif
2012-02-08 18:18 ` Andrej Bauer
@ 2012-02-08 18:21 ` Paolo Donadeo
2012-02-08 19:01 ` Adrien
2012-02-08 18:49 ` Ouchet Florent
2 siblings, 1 reply; 6+ messages in thread
From: Paolo Donadeo @ 2012-02-08 18:21 UTC (permalink / raw)
To: OCaml mailing list
[-- Attachment #1: Type: text/plain, Size: 236 bytes --]
I use Unix.system but: what popup?
--
Paolo
On Wed, Feb 8, 2012 at 17:53, Fady Nassif <fady@altair.com> wrote:
> Hello,
>
> Does anyone know how I can launch a batch file from Ocaml without pop up
> windows.
>
> Thanks
>
> Fady
>
[-- Attachment #2: Type: text/html, Size: 598 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] sys command
2012-02-08 16:53 [Caml-list] sys command Fady Nassif
2012-02-08 18:18 ` Andrej Bauer
2012-02-08 18:21 ` Paolo Donadeo
@ 2012-02-08 18:49 ` Ouchet Florent
2 siblings, 0 replies; 6+ messages in thread
From: Ouchet Florent @ 2012-02-08 18:49 UTC (permalink / raw)
To: caml-list
Hi Fady,
Just launch cmd.exe with the right parameters "/C your_script.bat".
Ideally the path to cmd.exe is stored in the environment variable
"ComSpec". You can also specify read/write/error pipes like for other
usual applications.
Cheers,
--
Florent Ouchet
PRAG Génie Electrique
ENS Cachan Antenne de Bretagne - Département mécatronique
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] sys command
2012-02-08 18:21 ` Paolo Donadeo
@ 2012-02-08 19:01 ` Adrien
0 siblings, 0 replies; 6+ messages in thread
From: Adrien @ 2012-02-08 19:01 UTC (permalink / raw)
To: Paolo Donadeo; +Cc: OCaml mailing list
On 08/02/2012, Paolo Donadeo <p.donadeo@gmail.com> wrote:
> I use Unix.system but: what popup?
I guess the "cmd.exe" one since Sys.command and Unix.system use the
same underlying function: system(3).
As far as I remember, Unix.create_process will not pop any additional(*) window.
(*) Of course, there's no magic here: if the process itself opens a
console window, you will always get one.
Linking with "gcc -mwindows" or "ld --subsystem windows" (not sure
about the syntax for ld) would solve it. If you can't link again, you
can still modify the binary with a tool or by hand since it's a single
bit (maybe two) in the PE header.
Hope this helps,
Adrien Nader
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Caml-list] sys command
2012-02-08 18:18 ` Andrej Bauer
@ 2012-02-08 21:12 ` oliver
0 siblings, 0 replies; 6+ messages in thread
From: oliver @ 2012-02-08 21:12 UTC (permalink / raw)
To: Andrej Bauer; +Cc: Fady Nassif, caml-list
On Wed, Feb 08, 2012 at 07:18:13PM +0100, Andrej Bauer wrote:
> > Does anyone know how I can launch a batch file from Ocaml without pop up
> > windows.
>
> <troll>Use an operating system which does not contain the word
> "windows" in its name?</troll>
[...]
LOL
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-02-08 21:13 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-08 16:53 [Caml-list] sys command Fady Nassif
2012-02-08 18:18 ` Andrej Bauer
2012-02-08 21:12 ` oliver
2012-02-08 18:21 ` Paolo Donadeo
2012-02-08 19:01 ` Adrien
2012-02-08 18:49 ` Ouchet Florent
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox