@echo off & title 在公共开始菜单程序目录创建快捷方式 By 依梦琴瑶
::自定义设置程序完整路径
set APP=
::自定义设置快捷方式名称
set LnkName=
%1 echo 正在请求管理员权限。。。&&mshta vbscript:CreateObject("Shell.Application").ShellExecute("cmd.exe","/c %~s0 ::","","runas",1)(window.close)&&exit
for %%a in ("%APP%") do call :CreatLink "%LnkName%" "%%~a" "%%~dpa"
CreatLink.vbs & del CreatLink.vbs
pause & exit
:CreatLink
(echo Set WshShell = WScript.CreateObject^("WScript.Shell"^)
echo AUP = WshShell.SpecialFolders^("AllUsersPrograms"^)
echo set oShellLink = WshShell.CreateShortcut^(AUP ^& "\%~1.lnk"^)
echo oShellLink.TargetPath = """%~2"""
echo oShellLink.WorkingDirectory = """%~3"""
echo oShellLink.Save)>CreatLink.vbs
goto :eof