From: ptkwt@...2.teleport.com (Phil Tomson) Date: 2001-01-28T07:40:02+09:00 Subject: [ruby-talk:9986] system command on Windows(Arrgghhh!) I'm simply trying to run an app in a Dos window under Windows(98|NT|2K) - it has to run on at least all of those Windoze types - like: system("cmd.exe /c #{ENV[CYPRESS_DIR]}/bin/warp.exe") On NT this seems to work OK. I changed it to use command.com for Win9x: system("command.com /c #{ENV[CYPRESS_DIR]}/bin/warp.exe") -or even: system("command.com /c c:/warp/bin/warp.exe") and I get absolutely nothing out of it on Win98, yet I can run the exact same thing from the command line (well, I have to change the environment variable to the real path or course - and I have had the program print out the value of ENV[CYPRESS_DIR] just to make sure it's set right). I also tried using backticks - either on works on NT, but neither works on Win98 even if I hardcode the path instead of relying on the env var. I've also noticed another discrepancy in behaviour between NT and 98 in the case of backticks. On NT I can have: `cmd.exe /c c:/WARP/bin/warp.exe` and it doesn't mind the use of '/', Anyway, I thought I had all of this figured out until i started trying it on Win98. I discovered that there is a start command that will run the executable, but it runs it in a seperate window and I've found that if there is an error in the executable being run (like having a compiler compile a nonexistent file) that the other window just hangs there and never returns. Has anyone figured out how to get all of this to work consistently? I really like Ruby and I would like to use it for this project, but when it comes to the system and ``'s, well, they just work on Perl on all the WinXX platforms I've tried without any playing around... Can we get that kind of behaviour on Ruby eventually? Phil