标签:target 留空 文件 echo ram obj bat off gdi
@echo off
echo 快捷方式创建中,请稍候
::设置程序或文件的完整路径(必选)
set Program=
::设置快捷方式名称(必选)
set LnkName=
::设置程序的工作路径,一般为程序主目录,此项若留空,脚本将自行分析路径
set WorkDir=
::设置快捷方式显示的说明(可选)
set Desc=
if not defined WorkDir call:GetWorkDir "%Program%"
(echo Set WshShell=CreateObject("WScript.Shell"^)
echo strDesKtop=WshShell.SpecialFolders("DesKtop"^)
echo Set oShellLink=WshShell.CreateShortcut(strDesKtop^&"\%LnkName%.lnk"^)
echo oShellLink.TargetPath="%Program%"
echo oShellLink.WorkingDirectory="%WorkDir%"
echo oShellLink.WindowStyle=1
echo oShellLink.Description="%Desc%"
echo oShellLink.Save)>makelnk.vbs
makelnk.vbs
del /f /q makelnk.vbs
exit
goto :eof
:GetWorkDir
set WorkDir=%~dp1
set WorkDir=%WorkDir:~,-1%
goto :eof
标签:target 留空 文件 echo ram obj bat off gdi
原文地址:https://www.cnblogs.com/whx2008/p/12740479.html