Version française
Home     About     Download     Resources     Contact us    
Browse thread
Sort module musings
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Xavier Leroy <Xavier.Leroy@i...>
Subject: Re: Sys.command in Windows NT
> I'm unable to execute Sys.command under Windows NT.
> I get the error message:
> /c: Permission denied
> and a return value of 1.
> I'm sure that something is not configured correctly, but I'm not sure 
> where to look. 

First, check the environment variables COMSPEC and PATH in your
environment, because that's where the C library function system()
(which implements Sys.command) looks for the Windows command
interpreter.  On my installation of NT, for instance, I have
COMSPEC set to C:\winnt\system32\cmd.exe, which is NT's command interpreter.
If COMSPEC is unset, I think system() searches in PATH for cmd.exe or
command.exe.

If the environment variables look OK, but the command line given to
Sys.command is longer than 1000 characters, try first with shorter
commands.  Long command lines are treated specially by the OCaml
runtime, and there might be a problem there.

If that doesn't help, I don't know how to proceed.  As far as I know,
there is no Windows tool that would trace the system calls performed
by OCaml, so that we know exactly what is happening.

- Xavier Leroy