|
|
clisp, ext:shell, Windows XP and 7
Below is the post that I had written but had not posted. Before I
submitted the post, I decided to give it one last try. I hit on a
solution (after several hours) and I'm passing it along both because
it may help someone else and because i like to show the world my
ignorance (with a tip o' the hat to Alex).
I used the full path AND the DOS (short) names (like PROGRA~1) and it
works on Windows 7. If you don't realize it, you can still get to the
old DOS prompt by invoking command.com in the command interpreter.
CC
-------------------------------------------------------------------------------------
On Windows XP, I can do this:
CL-USER> (ext:shell "notepad") ; and get an instance of notepad
CL-USER> (ext:shell "gvim") ; and get an instance of vim
On Windows 7, I can do this:
CL-USER> (ext:shell "notepad") ; and get an instance of notepad
CL-USER> (ext:shell "gvim") ; but get this error
*** - Win32 error 2 (ERROR_FILE_NOT_FOUND): The system cannot find the
file specified.
The following restarts are available:
ABORT :R1 Abort main loop
I'm migrating away from XP to Windows 7, and am finding that a good
amount of the software I use on XP doesn't work on Win 7, but this is
the first problem I've had with my Lisp programs. On both machines,
the programs are installed similarly, but even giving an absolute path
to ext:shell doesn't work.
Any clue as to the problem, and if so, is it something that I can fix
or is it something with to OS?
Thanks, CC.
|
|
0
|
|
|
|
Reply
|
cartercc (423)
|
5/29/2012 8:17:28 PM |
|
> I used the full path AND the DOS (short) names (like PROGRA~1) and it
> works on Windows 7. If you don't realize it, you can still get to the
> old DOS prompt by invoking command.com in the command interpreter.
Let me guess, that absolute path had spaces in it?
You see, ext:shell passes a command string to command interpreter.
"c:\\foo bar baz" would be interpreted as "run program c:\\foo.exe with
arguments bar and baz", not as "run 'c:\\foo bar baz'". (Although
command interpreter might try some alternative if it fails.)
To run a concrete program you should use EXT:RUN-PROGRAM. It would call
program directly without going through command interpreter.
> On Windows XP, I can do this:
>
> CL-USER> (ext:shell "notepad") ; and get an instance of notepad
> CL-USER> (ext:shell "gvim") ; and get an instance of vim
>
> On Windows 7, I can do this:
>
> CL-USER> (ext:shell "notepad") ; and get an instance of notepad
> CL-USER> (ext:shell "gvim") ; but get this error
>
> *** - Win32 error 2 (ERROR_FILE_NOT_FOUND): The system cannot find the
> file specified.
I guess you need to learn about how Windows finds executables. Simplest
way is to configure PATH environment variable, I guess.
But it has absolutely nothing to do with Lisp.
|
|
0
|
|
|
|
Reply
|
alex.mizrahi (228)
|
5/30/2012 11:53:23 AM
|
|
On May 30, 7:53=A0am, Alex Mizrahi <alex.mizr...@gmail.com> wrote:
> Let me guess, that absolute path had spaces in it?
Yes. "Program Files"
> You see, ext:shell passes a command string to command interpreter.
>
> "c:\\foo bar baz" would be interpreted as "run program c:\\foo.exe with
> arguments bar and baz", not as "run 'c:\\foo bar baz'". (Although
> command interpreter might try some alternative if it fails.)
Yes, that's exactly what happened.
> To run a concrete program you should use EXT:RUN-PROGRAM. It would call
> program directly without going through command interpreter.
Tried that, same results.
> I guess you need to learn about how Windows finds executables. Simplest
> way is to configure PATH environment variable, I guess.
> But it has absolutely nothing to do with Lisp.
PATH was fine. The problem was as you noted, aggravated by the
somewhat general error message that the file was not found. The 'file'
that wasn't found was named "Program" with a command line parameter of
"Files" followed by other arguments. Took me half a day to figure it
out.
CC
|
|
0
|
|
|
|
Reply
|
cartercc (423)
|
5/30/2012 1:28:38 PM
|
|
|
2 Replies
45 Views
(page loaded in 0.299 seconds)
|
|
|
|
|
|
|
|
|