Torgeir
Thu May 26 14:38:16 CDT 2005
MSNEWS wrote:
> Wonder how to use a script to create a shortcut on user's desktop which
> connect them a network share folder, eg: \\server\shared
>
> I dont want to use net use commmand because it would require a drive letter.
> Although I can instruct user to go to my network places and use the wizzard
> to add a network place, however, users generall do not know how to do so,
> besides many user's network places are hidden by the GPO.
Hi,
Something like this maybe:
'--------------------8<----------------------
Set oShell = CreateObject("WScript.Shell")
' Create shortcut in the All Users Desktop folder
sAllUsersDesktopPath = oShell.SpecialFolders("AllUsersDesktop")
Set oShortCut = oShell.CreateShortcut( _
sAllUsersDesktopPath & "\Some Network Drive.lnk")
oShortCut.TargetPath = "\\server\shared"
oShortCut.Save
MsgBox "Shortcut is now created.", _
vbInformation + vbSystemModal, "Create shortcuts"
'--------------------8<----------------------
--
torgeir, Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of
the 1328 page Scripting Guide:
http://www.microsoft.com/technet/scriptcenter/default.mspx