Function Add_Shortcut_Desktop( Name$ as string , FileLocation$ as string , IconLocation$ as string , FileDescription$ as string , WorkingDIR$ as string, ShortcutKeys$ as string )
quote as string : quote = chr$( 34 )
If File Exist("C:\Shortcut.vbs") then Delete File "C:\Shortcut.vbs"
Open To Write 1, "C:\Shortcut.vbs"
Write String 1, "set WshShell = WScript.CreateObject(" + quote + "WScript.Shell" + quote + ")"
Write String 1, "strDesktop = WshShell.SpecialFolders(" + quote + "Desktop" + quote + ")"
Write String 1, "set oShellLink = WshShell.CreateShortcut(strDesktop & " + quote + "\" + Name$ + ".lnk" + quote + ")"
Write String 1, "oShellLink.TargetPath = " + quote + FileLocation$ + quote
Write String 1, "oShellLink.WindowStyle = 1"
Write String 1, "oShellLink.Hotkey = " + quote + ShortcutKeys$ + quote
Write String 1, "oShellLink.IconLocation = " + quote + IconLocation$ + quote
Write String 1, "oShellLink.Description = " + quote + FileDescription$ + quote
Write String 1, "oShellLink.WorkingDirectory = " + quote + WorkingDIR$ + quote
Write String 1, "oShellLink.Save"
Close File 1
Execute File "C:\Shortcut.vbs", "", ""
wait 1000
If File Exist("C:\Shortcut.vbs") then Delete File "C:\Shortcut.vbs"
endFunction
I have used this code in my installer and it works pretty well...