创建应用快捷方式脚本
作者:互联网
创建应用快捷方式脚本
@echo off set Program=%cd%\MySoft\App.exe set LnkName=我的软件
set WorkDir=%cd%\MySoft 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 echo 桌面快捷方式创建成功! makelnk.vbs del /f /q makelnk.vbs exit goto :eof :GetWorkDir set WorkDir=%~dp1 set WorkDir=%WorkDir:~,-1% goto :eof
=========== End
标签:脚本,set,oShellLink,创建,echo,WorkDir,WshShell,快捷方式 来源: https://www.cnblogs.com/lsgxeva/p/15027191.html