需将站点设为信任站点。
复制代码 代码如下:
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://www.jb51.net";
link.WindowStyle = 3;
link.WorkingDirectory = "c:\\blah";
link.Save();
}
复制代码 代码如下:
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://www.jb51.net";
link.WindowStyle = 3;
link.WorkingDirectory = "c:\\blah";
link.Save();
}
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
桃源资源网 Design By www.nqtax.com
暂无“使用javascript创建快捷方式的简单实例”评论...