利用批处理创建桌面快捷方式
goto :eof
Rem 以下为VbScript脚本
Set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop") :'特殊文件夹“桌面”
Rem 在桌面创建一个记事本快捷方式
set oShellLink = WshShell.CreateShortcut(strDesktop & "\记事本.lnk")
oShellLink.TargetPath = "notepad.exe" : '目标
oShellLink.WindowStyle = 3 :'参数1默认窗口激活,参数3最大化激活,参数7最小化
oShellLink.Hotkey = "Ctrl+Alt+e" : '快捷键
oShellLink.Ic : '图标
oShellLink.Description = "记事本快捷方式" : '备注
oShellLink.WorkingDirectory = strDesktop : '起始位置
oShellLink.Save : '创建保存快捷方式
Rem 在桌面创建一个 腾讯QQ 2007
set oShellLink = WshShell.CreateShortcut(strDesktop & "\腾讯QQ 2007 .lnk")
oShellLink.TargetPath = "D:\Tencent\QQ\QQ.exe" : '目标
oShellLink.WindowStyle = 3 :'参数1默认窗口激活,参数3最大化激活,参数7最小化
oShellLink.Hotkey = "Ctrl+Alt+q" : '快捷键
oShellLink.Ic : '图标
oShellLink.Description = "腾讯QQ 2007" : '备注
oShellLink.WorkingDirectory = strDesktop : '起始位置
oShellLink.Save : '创建保存快捷方式
Rem 在桌面创建一个“微软中国”的Url快捷方式
set oUrlLink = WshShell.CreateShortcut(strDesktop & "\百度搜索.url")
oUrlLink.TargetPath = "
http://www.baidu.com/"
oUrlLink.Save