Listing 1: Create Network Place ' Create a Network Place (XP) or Network Location (Vista). Option Explicit ' Generic objects - can be moved to the global part of script. Dim WSHShell, FSO Set WSHShell = WScript.CreateObject("WScript.Shell") Set FSO = CreateObject("Scripting.FileSystemObject") Dim sFolderPath, sTargetPath ' Create the network location. ' This is the only block of the script that you should need to change. ' Example: a document library network location created in the NetHood folder. sFolderPath = WSHShell.SpecialFolders("NetHood") & "\" & _ "Marketing Department Document Library" sTargetPath = "\\sharepoint.contoso.com\sites\marketing\shared documents" CreateNetworkLocation sFolderPath, sTargetPath ' This routine creates a Network Location that's actually a read only folder ' containing a regular shortcut named target.lnk and a desktop.ini file with ' specific contents. Begin Callout A Sub CreateNetworkLocation(sFolderPath, sTargetPath) Dim oTextFile, oFolder, oShortcut ' First, delete any existing network location. If FSO.FolderExists(sFolderPath) Then FSO.DeleteFolder sFolderPath, True End If ' Create the folder and make it read only. ' Required for Network Location ' Create the folder. Set oFolder = FSO.CreateFolder(sFolderPath) ' Set the read-only attribute. oFolder.Attributes = 1 ' Create the shortcut to the target inside the folder Set oShortcut = WSHShell.CreateShortcut(oFolder.Path & "\target.lnk") oShortcut.TargetPath = sTargetPath oShortcut.Save ' Create the Desktop.ini file, which makes it a Network Location ' and assigns the icon. Set oTextFile = oFolder.CreateTextFile("Desktop.ini", True) oTextFile.WriteLine "[.ShellClassInfo]" oTextFile.WriteLine "CLSID2={0AFACED1-E828-11D1-9187-B532F1E9575D}" oTextFile.WriteLine "Flags=2" oTextFile.WriteLine "ConfirmFileOp=0" ' 1 displays a warning that this is a system folder ' when moving, deleting, renaming a system folder. ' 0 avoids the warnings. oTextFile.Close End Sub