shorname是快捷方式的名称path是快捷方式的路径,如果创建在D盘的doc文件夹内,则path=d:\doc=================================================================================@echo off
set name=e:\1.exe
set shortname=1
set path=c:if not exist "%name%" (echo 文件不存在&pause&exit)
echo Set WshShell = WScript.CreateObject("WScript.Shell")>%temp%\tm.vbs
echo set osk = WshShell.CreateShortcut("%path%"^& "\%shortname%.lnk")>>%temp%\tm.vbs
echo osk.TargetPath = "%name%">>%temp%\tm.vbs
echo osk.WindowStyle = ^1>>%temp%\tm.vbs
echo osk.IconLocation = "%name%">>%temp%\tm.vbs
rem echo osk.IconLocation = "%SystemRoot%\system32\SHELL32.dll,2">>%temp%\tm.vbs
echo osk.Description = "Shortcut">>%temp%\tm.vbs
echo osk.Save>>%temp%\tm.vbs
start %temp%\tm.vbs