Monday, September 27, 2010

VBS script to create shortcut to network location

Set objShell=Wscript.CreateObject("Wscript.shell")
strDesktopFolder=objShell.SpecialFolders("Desktop") & _
"\"
Set objShortcut=objShell.CreateShortcut(strDesktopFolder & _
"Company Files.lnk")
objShortCut.TargetPath = "\\server\Folder"
objShortCut.Description = "Company Files Description"
objShortCut.Save

No comments: