2025年2月24日 星期一 甲辰(龙)年 腊月廿四 设为首页 加入收藏
rss
您当前的位置:首页 > 计算机 > 系统应用 > Windows

Windows VBS脚本创建快捷方式

时间:06-27来源:作者:点击数:20

Windows VBS脚本创建快捷方式

  • set WshShell = WScript.CreateObject("WScript.Shell")
  • strDesktop = WshShell.SpecialFolders("Desktop") '获得桌面目录
  • set oShellLink = WshShell.CreateShortcut(strDesktop & "\GzServer.lnk") '快捷方式存放目录及名称
  • oShellLink.TargetPath = "D:\GbServer\GBServer.bat" '指向的可执行文件
  • oShellLink.WindowStyle = 1 '运行方式(窗体打开的方式)
  • 'oShellLink.Hotkey = "CTRL+SHIFT+F" '快捷键
  • oShellLink.IconLocation = "D:\GbServer\img\log.ico, 0" '图标(同样可不指定)
  • oShellLink.Description = "ChinaDforce YanMang" '备注信息
  • oShellLink.WorkingDirectory = "D:\GbServer\" '起始目录
  • oShellLink.Save '保存快捷方式
方便获取更多学习、工作、生活信息请关注本站微信公众号城东书院 微信服务号城东书院 微信订阅号
推荐内容
相关内容
栏目更新
栏目热门