怎么用批处理给一个文件创建快捷方式

来源:百度知道 编辑:UC知道 时间:2024/05/27 10:49:34

@echo off
echo [InternetShortcut] >>"%userprofile%\桌面\程序名字.url"
echo URL=E:\程序.exe >>"%userprofile%\桌面\程序名字QQ.url"
echo IconIndex=0 >>"%userprofile%\桌面\程序名字.url"
echo IconFile=E:\程序.exe >>"%userprofile%\桌面\程序名字.url"
echo 创建快捷方式完成
pause&exit

Rem 把要创建快捷方式的文件拖到此批处理文件上

'&@cls&start /min cscript //nologo //e:vbs "%~f0" "%~dpn1.lnk" "%~f1" "%~dp1"&goto :eof
set WshShell = WScript.CreateObject("WScript.Shell")
set oShellLink = WshShell.CreateShortcut(WScript.Arguments(0))
oShellLink.TargetPath = WScript.Arguments(1)
'oShellLink.WindowStyle = 1
'oShellLink.Hotkey = "CTRL+SHIFT+F"
'oShellLink.IconLocation = "notepad.exe, 0"
'oShellLink.Description = &qu