> > system("cmd.exe /c dir") #on NT|2000 or > > system("command.com /c dir") #on Win95|98|ME > > > > for a desc how to change the system command: > > > http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb?key=internet+ex plorer+win32api&cginame=namazu.rb&dbname=ruby-talk&max=50&whence=0 > > > This reference doesn't work for me. I believe this is the code he was trying to refer to: # code by Hee-Sob Park - posted here: # http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/10006 def system(command) Win32API.new("crtdll", "system", ['P'], 'L').Call(command) end # code by Hee-Sob Park - posted here: # http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/10006 def `(command) popen = Win32API.new("crtdll", "_popen", ['P','P'], 'L') pclose = Win32API.new("crtdll", "_pclose", ['L'], 'L') fread = Win32API.new("crtdll", "fread", ['P','L','L','L'], 'L') feof = Win32API.new("crtdll", "feof", ['L'], 'L') saved_stdout = $stdout.clone psBuffer = " " * 128 rBuffer = "" f = popen.Call(command,"r") while feof.Call( f )==0 l = fread.Call( psBuffer,1,128,f ) rBuffer += psBuffer[0..l] end pclose.Call f $stdout.reopen(saved_stdout) rBuffer end I use this all the time.