Koen's blog Profile Photo

Koen's blog

Ik typ. Ik typ voor mijn Sien, Arwen, Mila en Nienke.

start external process from within ruby

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:

# Need double quotes around filename if the path contains spaces
WMP9_EXE = ""C:\Program Files\Windows Media Player\wmplayer.exe""
...
# Type HELP START at the DOS/W prompt
# START "Window Name..." "EXE file" args

system "start " +""Window Name""+ " " + WMP9_EXE + " " + args