http://blog.csdn.net/tan_jianhui/article/details/5969496
批处理中直接执行vbs的方法_DOS/BAT_脚本之家
http://www.jb51.net/article/25962.htm
命令行创建快捷方式.bat
点击(此处)折叠或打开
- :On Error Resume Next
- Sub bat
- echo off & cls
- start wscript -e:vbs "%~f0"
- Exit Sub
- End Sub
- MsgBox "This is vbs"
- Set WshShell = WScript.CreateObject("WScript.Shell")
- strDesktop = WshShell.SpecialFolders("Desktop")
- set oShellLink = WshShell.CreateShortcut(strDesktop & "/myQQ.lnk")
- oShellLink.TargetPath = "C:\Program Files\Tencent\QQ\QQProtect\Bin\QQProtect.exe"
- oShellLink.WindowStyle = 3
- oShellLink.Hotkey = "Ctrl+Alt+e"
- oShellLink.IconLocation = "C:\Program Files\Tencent\QQ\QQProtect\Bin\QQProtect.exe, 0"
- oShellLink.Description = "快捷方式"
- oShellLink.WorkingDirectory = strDesktop
- oShellLink.Save