SHORTCUT - DESKTOP ICON If you have produced an application running under .hta or .exe, a desktop shortcut icon to startup your application is useful and gives a nice finishing touch. Write a small Javascript file, or incorporate the following into your setup code: function createShortcut() { if (ActiveXObject) { WshShell = new ActiveXObject( "WScript.Shell" ); strDesktop = WshShell.SpecialFolders("Desktop"); oShellLink = WshShell.CreateShortcut(strDesktop + "\\blahblah.lnk"); oShellLink.TargetPath = path; // eg "C:\\XXX\\Program\\blahblah.hta"; oShellLink.WindowStyle = 1; oShellLink.Description = "BlahBlah"; oShellLink.WorkingDirectory = strDesktop; oShellLink.IconLocation = image path; // eg "C:\\XXX\\Program\\images\\your_icon.bmp"; oShellLink.Save(); } } Chose a 68 x 68 pix image for your icon. A useful site for image conversions to icons is: CoolUtils This code will result in a shortcut on your desktop, labelled "BlahBlah". Enjoy! Top
|