function toDesktop(sUrl,sName){
try {
var WshShell = new ActiveXObject("WScript.Shell");
var oUrlLink = WshShell.CreateShortcut(WshShell.SpecialFolders("Desktop") "\" sName ".url");
oUrlLink. TargetPath = sUrl;
oUrlLink.Save();
}catch(e){
alert("The operation is not allowed at the current IE security level!");
}
}
Create shortcut