赞
踩
@echo 创建test.exe的快捷方式 @echo on set workingDir=%path% set targetPath=%path%\test.exe set lnkPath=%~dp0\TEST.lnk set SCRIPT="%TEMP%\%RANDOM%-%RANDOM%-%RANDOM%-%RANDOM%.vbs" echo Set oWS = WScript.CreateObject("WScript.Shell") >> %SCRIPT% echo sLinkFile = "%lnkPath%" >> %SCRIPT% echo Set oLink = oWS.CreateShortcut(sLinkFile) >> %SCRIPT% ::设置快捷方式的目标位置 echo oLink.TargetPath = "%targetPath%" >> %SCRIPT% ::设置快捷方式的起始位置 echo oLink.WorkingDirectory = "%workingDir%" >> %SCRIPT% echo oLink.Save >> %SCRIPT% cscript /nologo %SCRIPT% del %SCRIPT%
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。