8

we're running an ActiveDirectory environment (Windows 2008 Server, XP Clients) and want to have some shares listed as Shared Resources under the Network Neighbourhood. I do not want to map it to a drive letter.

This is easy in the UI but I can't seem to find a way to do it automatically via scripts/GPO/etc.

The reason we want it there and not under "My Computer" is because the Higher-Ups want it that way.

EDIT: Clarification

tliff
  • 145
  • 1
  • 1
  • 9

3 Answers3

8

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.

Glorfindel
  • 1,213
  • 3
  • 15
  • 22
jscott
  • 24,204
  • 8
  • 77
  • 99
  • That's an expensive digital camera ;) – MDMarra Jan 17 '13 at 18:56
  • @MDMarra *edited Mar 26 '10* -- that pre-dates the iPod Touch gen4 (first iPod Touch with a camera) by ~5 months. I have no idea what the hell Windows was thinking about my gen2 iPod Touch. :) – jscott Jan 17 '13 at 19:00
2

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...

Tie-fighter
  • 741
  • 2
  • 9
  • 17
0

You don't mention what OS you are using, but Win 2008 will use a GPO to do this as noted by @Tie-Fighter. Windows 2003 will allow you to do this as a GPO via script in User configuration-Windows Settings-Scripts

Dave M
  • 4,494
  • 21
  • 30
  • 30