Subscribe to RSS Feed
Twitter
HIRE ME! home  archives  about  blogroll

start external process from within ruby

01 Dec 2003

sweet! via zoran’s project i found out how to start an external process from ruby in a Win32 environment. it’s very straigth forward actually (as is everything in ruby) , here’s zoran’s code snippet:

  1. Need double quotes around filename if the path contains spaces
    WMP9_EXE = ""C:\Program Files\Windows Media Player\wmplayer.exe""

  2. Type HELP START at the DOS/W prompt
  3. START “Window Name…” “EXE file” args

    system "start " ""Window Name"" " " + WMP9_EXE + " " + args
blog comments powered by Disqus