require 'Win32API'
shellexecute = Win32API.new('shell32.dll','ShellExecuteA',%w(p p p p p i),'i')
shellexecute.call(0, 'open', 'foo.txt', 0, 0, 1)