system_exec fun :(

new topic     » topic index » view thread      » older message » newer message

Gents and Ladies,
After many hours of puzzlement, code butchering and fighting with
delimiters,
I discovered that you cannot call a program directly via system_exec if the
program name is not the msdos 8.3 format. While the difficulties with the
 "C:\\progra~1\\" etc are mentioned in the mailing list, the program name
restriction does not appear to be.
example: system_exec("PatrolCli",2)  -- fails with -1, no other info
while system_exec("PATROL~1",2) -- works ok.
What took so long, was the fact that if you type the "PatrolCli" yourself,
it works!

The workaround is to do a dos "dir /X" and trap the output - this shows both
the
 long and shortened name. Grab the short version and away you go.

Also, system_exec is a function that returns -1 if the command failed.
 You can't redirect output, so you are in the dark as to the failure.
Anybody know a sane way of discovering the problem when you get -1 ?.
Tried  system() but I get invalid command; I have a convoluted argument
that is not acceptible to system(). Over 100 chars long in fact.
I've fixed it now, but what about next time?

Finally, you can't stack win2k (dos) commands with an ampersand -
 you get "invalid continuation" from Euphoria.

IMHO some better feedback from system_exec would be very welcome!

HTH other strugglers with system_exec.

Cheers
Alan

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu