DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Launching The Default Web Browser On MS Windows
# This code will launch your default web browser to the URL you provide
require 'Win32API'
ShellExecute = Win32API.new('shell32', 'ShellExecute', 'LPPPPI', 'L')
unless ShellExecute.call(0, 'open', 'http://www.rubyforge.org', 0, 0, 1) > 0
raise "ShellExecute failed"
end





