Posted in Javascript onAugust 09, 2013
需将站点设为信任站点。
var fso = new ActiveXObject("Scripting.FileSystemObject"); var shell = new ActiveXObject("WScript.Shell"); var tagFolder = "c:\\Temp"; if(!fso.FolderExists(tagFolder )) { fso.CreateFolder(tagFolder); //alert("Create success!"); } if(!fso.FileExists(tagFolder + "\\eip.lnk")) { var link = shell.CreateShortcut(tagFolder + "\\eip.lnk"); link.Description = "打开一个程序的快捷方式"; link.TargetPath = "https://3water.com"; link.WindowStyle = 3; link.WorkingDirectory = "c:\\blah"; link.Save(); }
使用javascript创建快捷方式的简单实例
声明:登载此文出于传递更多信息之目的,并不意味着赞同其观点或证实其描述。
Reply on: @reply_date@
@reply_contents@