- 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 '保存快捷方式
-