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
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:
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 togoogle.com
in both examples.Windows XP:
Windows 7:
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...
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