newLISP Fan Club

Forum => newLISP and the O.S. => Topic started by: pjot on August 14, 2004, 01:59:45 PM

Title: The 'process' statement does not work in XP
Post by: pjot on August 14, 2004, 01:59:45 PM
Hi Lutz,



Cross-testing my UDP chat, it seems that I cannot startup an external binary anymore (WinXP). E.g.:



(process "gtk-server tcp localhost:50000")



does NOT start a process. I tested this line with Win2000 also, but strangely enough, there it works!



Am I doing something wrong here?



Cheers



Peter
Title:
Post by: pjot on August 15, 2004, 03:45:33 AM
Just to avoid confusion: my screenshot was made by manually starting up the GTK-server, and after that, run the newLisp script.



On 2 systems I have here, running XP, the 'process' command does not work anymore... Linux and Win2000 seem to be OK.
Title:
Post by: HPW on August 15, 2004, 04:00:06 AM
From the docu:



(process "notepad")



works for me here on XP.
Title:
Post by: pjot on August 15, 2004, 04:15:50 AM
Indeed, this works for me too.



After some more testing, I found that the 'notepad.exe' resides in the C:WINDOWS directory; and if I put my 'gtk-server.exe' there as well, the newlisp 'process' command can startup this binary also successfully.



So, it seems to be a problem of the "PATH" environment variable. The 'notepad.exe' program can be found since it's directory is mentioned of the System variable "Path" (one capital), while my GTK-server directory only is mentioned in the User variable "PATH" (all capitals).



For some strange reason this problem seems not to occur with Win2000.



I guess I have to adapt my installer so the System variable "Path" is adjusted as well.
Title:
Post by: pjot on August 15, 2004, 05:37:31 AM
But still, if I specify the full path to the binary, the 'process' statement still does not work:



(process "c:gtk-servergtk-server.exe tcp localhost:50000")



...delivers a nil. So it seems that only those binaries can be started whose directory appear in the System variable "Path".
Title:
Post by: HPW on August 15, 2004, 06:00:07 AM

(process "C:/Programme/UltraEdit/Uedit32.exe")


Works for me.



I think your problem are '' instead of '/'
Title:
Post by: Lutz on August 15, 2004, 06:36:27 AM
I too use always forward slash, bat you can do:



(process "c:\gtk-server\gtk-server.exe tcp localhost:50000")



and that will also work,  in neeLISP is a the 'escape' character for n r \ " etc.



Lutz
Title:
Post by: pjot on August 15, 2004, 06:55:45 AM
OK stupid of me; the forward slash I could have know myself since I suffer the same problem in my configfile for the GTK-server.



Only 1 minor issue remains then: why are executables found with the System variable "Path" and why are they not found when available in the User environment variable "PATH"? It means mortal users of XP must have administrator privileges in order to install 3rd party software which can be executed with 'process'.



I will retest this with other Windows versions just to make sure the behaviour.



Thanx for your thoughts!