From: Evgeniy Dolzhenko Date: 2009-05-18T16:45:43+09:00 Subject: [ruby-core:23491] [Bug #1482] Kernel.exec doesn't respect COMSPEC environment variable on Windows Bug #1482: Kernel.exec doesn't respect COMSPEC environment variable on Windows http://redmine.ruby-lang.org/issues/show/1482 Author: Evgeniy Dolzhenko Status: Open, Priority: Normal Category: core, Target version: Ruby 1.8.7 ruby -v: ruby 1.8.7 (2008-08-11 patchlevel 72) [i386-mswin32] Here is pretty convoluted test case: puts ENV["COMSPEC"] # => "C:\WINDOWS\system32\mycmd.exe" File.open("1.bat", "w") { |f| f.write("time") } # create test batch file with command which waits for user input Kernel.exec("1.bat") # now the process tree inspection shows that the "C:\WINDOWS\system32\cmd.exe" is still used to interpret 1.bat ---------------------------------------- http://redmine.ruby-lang.org