Automatically mounting a network share as Shared Resource

Please identify which OSes you're using for both server and clients.

In client OSes above 98/NT "Network Neighbourhood" has been superseded by "My Network Places". The location of this resource is defined by two registry entries:

HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders\NetHood
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders\NetHood

If you create shortcuts to a network resource, such as a UNC path to a share, within the folder noted by NetHood the shortcut will appear under "My Network Places". You can also place Internet Shorcuts [e.g. .url files] to websites within this directory.

It is easy to popluate the contents of the NetHood directory using a logon script via Group Policy or, better yet, Group Policy Client-Side Preferences.

Note that the NetHood directory's location differs greatly between Windows XP and Windows 7. In addition the GUI behaviour differs slightly between the OSes as displayed in the below screenshots. I created a shortcut to a UNC share \\fcsd-staff\district and a URL shortcut to google.com in both examples.

Windows XP: WinXP

Windows 7: Win7

Edit:

You may also user folder redirection. This could be handy if you would like to only populate one directory with shortcuts, as described above, rather than polluting each user's profile directly.

Using a logon script, or CSP, you can set the HKCU\...\User Shell Folders\NetHood value's data to a user accessible path, e.g. \\server\share\Nethood, and then populate that directory. This ensures all users with this redirection have identical shortcuts. If/when management removes their decree, you simply change the NetHood redirection back to the user's profile.


Under Windows Server 2008 R2 you can map shares with GPs via User Configuration/Preferences/Windows Settings/Drive Maps

If you want to use a script you can use the "net share" and "net use" commands

net share: http://technet.microsoft.com/en-us/library/bb490712.aspx
net use: http://technet.microsoft.com/en-us/library/bb490717.aspx

I hope that is what you were looking for...