diff --git a/生成快捷方式.vbs b/生成快捷方式.vbs new file mode 100644 index 0000000..240458b --- /dev/null +++ b/生成快捷方式.vbs @@ -0,0 +1,27 @@ + +' 创建Shell对象 +Set objShell = CreateObject("WScript.Shell") + +' 获取脚本所在文件夹路径 +strScriptFolder = objShell.CurrentDirectory + +' 获取桌面路径 +strDesktop = objShell.SpecialFolders("Desktop") + +' 创建快捷方式对象 +Set objShortcut = objShell.CreateShortcut(strDesktop & "\CBMA.lnk") + +' 设置快捷方式的目标路径为脚本本身 +objShortcut.TargetPath = strScriptFolder & "\start.vbs" + +' 设置快捷方式的图标路径为脚本所在文件夹下的favicon.ico +objShortcut.IconLocation = strScriptFolder & "\favicon.ico" + +objShortcut.WorkingDirectory = strScriptFolder + +' 保存快捷方式 +objShortcut.Save + +' 释放对象 +Set objShortcut = Nothing +Set objShell = Nothing