This batch script checks if the variable "WorkDir" is defined. If it is not defined, it calls the "GetWorkDir" function with the argument "%Program%". Then it echoes a series of commands to create a shortcut on the desktop using a VBScript file called "makelnk.vbs".

The VBScript creates a Windows Script Host shell object, gets the path to the desktop folder, creates a new shortcut object and sets its target path to "%Program%". Finally, it saves the shortcut with the name specified by the "%LnkName%" variable.

Overall, this script is used to create a shortcut to a program on the user's desktop if it doesn't already exist

if not defined WorkDir callGetWorkDir Programecho Set WshShell=CreateObjectWScriptShell^echo strDesKtop=WshShellSpecialFoldersDesKtop^echo Set oShellLink=WshShellCreateShortcutstrDesKtop^&LnkNamelnk^e

原文地址: https://www.cveoy.top/t/topic/eCNa 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录