我需要创建批处理或VBScript(用于AD)以仅为位置创建桌面快捷方式。例如,快捷方式是指定文件,但我需要快捷方式才能只打开服务器位置\\server\shared folder
答案 0 :(得分:1)
考虑到它是一台Windows机器,我正在为你推荐这个VBScript代码段......
Dim FileName
FileName = "Shortcut"
Set shortcut = CreateObject("WScript.Shell").CreateShortcut(CreateObject("WScript.Shell").SpecialFolders("Desktop") & + "\" + FileName + ".lnk")
shortcut.Description = "shortcut To a shared folder"
shortcut.TargetPath = "\\server\shared"
shortcut.Save
targetPath可以是文件夹,文件或可执行文件。