批处理创建快捷方式并指定快捷键

来源:百度知道 编辑:UC知道 时间:2024/05/15 02:34:07
批处理创建快捷方式并指定快捷键

@echo off
>"%userprofile%\桌面\2.vbs" echo Set WshShell = WScript.CreateObject("WScript.Shell")
>>"%userprofile%\桌面\2.vbs" echo strDesktop = WshShell.SpecialFolders("AllUsersDesktop")
>>"%userprofile%\桌面\2.vbs" echo set oShellLink = WshShell.CreateShortcut(strDesktop ^& "\记事本.lnk")
>>"%userprofile%\桌面\2.vbs" echo oShellLink.TargetPath = "C:\WINDOWS\NOTEPAD.EXE"
>>"%userprofile%\桌面\2.vbs" echo oShellLink.WindowStyle = 1
>>"%userprofile%\桌面\2.vbs" echo oShellLink.Hotkey = "CTRL+ALT+J"
>>"%userprofile%\桌面\2.vbs" echo oShellLink.IconLocation = "C:\WINDOWS\NOTEPAD.EXE,0"
>>"%userprofile%\桌面\2.vbs" echo oShellLink.Description = ""
>>"%userprofile%\桌面\2.v