From: Shashank Date Date: 2004-08-04T11:01:31+09:00 Subject: Re: Windows Shortcuts =begin Hi Assaph, How about this? "Mehr, Assaph (Assaph)" wrote in message > Does anyone know how to programmatically create windows shortcuts (.lnk > files) using Ruby? =end require 'win32ole' shell = WIN32OLE.new("WScript.Shell") # Desktop shortcut strDesktop = shell.SpecialFolders("Desktop") oShellLink = shell.CreateShortcut(strDesktop + "\\Shortcut Script.lnk") oShellLink.TargetPath = "c:\\atest\\tst_shortcut.rb" #WScript.ScriptFullName oShellLink.WindowStyle = 1 oShellLink.Hotkey = "CTRL+SHIFT+F" oShellLink.IconLocation = "notepad.exe, 0" oShellLink.Description = "Shortcut Script" oShellLink.WorkingDirectory = strDesktop oShellLink.Save # URL shortcut oUrlLink = shell.CreateShortcut(strDesktop + "\\Rubyforge.url") oUrlLink.TargetPath = "http://rubyforge.org/" oUrlLink.Save __END__