set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
set oShellLink = WshShell.CreateShortcut(strDesktop & "/XXXX.lnk")
oShellLink.TargetPath = "//FileServer/XXXX.XXX"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "%SystemRoot%/system32/SHELL32.dll, 148"
oShellLink.Description = "Use to set IE proxy"
oShellLink.WorkingDirectory = strDesktop
oShellLink.Save
set oShellLink = nothing
set Wshshell = nothing
WScript.quit
--------------------------------------------------------------------------------------------
remark: XXXX is the file's name
strDesktop = WshShell.SpecialFolders("Desktop")
set oShellLink = WshShell.CreateShortcut(strDesktop & "/XXXX.lnk")
oShellLink.TargetPath = "//FileServer/XXXX.XXX"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "%SystemRoot%/system32/SHELL32.dll, 148"
oShellLink.Description = "Use to set IE proxy"
oShellLink.WorkingDirectory = strDesktop
oShellLink.Save
set oShellLink = nothing
set Wshshell = nothing
WScript.quit
--------------------------------------------------------------------------------------------
remark: XXXX is the file's name
本文介绍了一个使用VBS脚本创建Windows桌面快捷方式的方法。通过创建WScript.Shell对象,可以设置快捷方式的目标路径、图标位置及描述等属性。
2万+

被折叠的 条评论
为什么被折叠?



