on Xp ->
This (process "c:/windows/system32/cmd.exe ") does create a directory called .exe in the current directory?? why is that? ;-)
Norman.
process on windows
process on windows
-- (define? (Cornflakes))
Code: Select all
#!newlisp
(setq _P_WAIT 0)
(setq _P_NOWAIT 1)
(setq _P_OVERLAY 2)
(import "crtdll.dll" "_spawnvp")
;(setq cmd "cmd.exe") ; starts cmd.exe
;(setq cmd "c:/WINDOWS/system32/notepad.exe") ; starts notepad
;(setq cmd "c:\\windows\\system32\\cmd.exe") ; starts cmd.exe
(setq cmd "c:/windows/system32/cmd.exe") ; makes .exe folder
(setq nullarg 0)
(setq pnullarg (address nullarg))
(println (_spawnvp _P_NOWAIT cmd pnullarg))
Edit:
Code: Select all
C:\>c:/windows/system32/cmd.exe
C:\>c:/windows/system32/cmd.exe
A subdirectory or file .exe already exists.
Actualy... why does (process "newlisp") not popup ?
Its started but i dont see it anywhere..
Even stranger:
This works ->
(process "c:\windows\system32\notepad.exe")
But this doesnt ->
(process "c:\program files\newlisp\newlisp.exe")
does the <space> has something to do with this?
Its started but i dont see it anywhere..
Even stranger:
This works ->
(process "c:\windows\system32\notepad.exe")
But this doesnt ->
(process "c:\program files\newlisp\newlisp.exe")
does the <space> has something to do with this?
-- (define? (Cornflakes))
Like Lutz said, it seems that if you start a command-line program from a command-line program, it uses the same console window.
e.g. cmd starting cmde.g. newlisp starting newlisp
This behavior is consistent with my Ubuntu terminal.
At least on windows, if you want to open a command-line program in its own console window, try this.
e.g. cmd starting cmd
Code: Select all
C:\>cmd.exe
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\>
Code: Select all
> (process "newlisp.exe")
1956
> newLISP v.9.2.0 on Win32, execute 'newlisp -h' for more info.
>
Code: Select all
> (process "newlisp")
5320
> newLISP v.9.1.0 on Linux, execute 'newlisp -h' for more info.
>
Code: Select all
(process "cmd.exe /c start cmd.exe")