Relabel network share based on drive letter
Hello, first, please forgive me, if I am posting in the wrong forum. Its my best guess ... At the moment I am preparing a rollout of Windows 7 clients for a customer. He wants, that mapped network shares do not display these cryptic UNC path information like "ShareName (\\servername)" but rather show a nice understandable name like "Archive" or so. While this is an easy task in the Windows explorer, just open the context menu of the share and rename it, it is kind of hard to do by script. Using the good old dos label command does not work. I always get an error, what I do not have the rights - although I am using a domain admin account. Also editing the registry is quite cumbersome. One would have to add a new string value under "HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\MountPoint2\##Servername#folder#subfolder#" with the name "_LabelFromReg". While this might work for a few shares, I have a setup where only a few shares of a large pool are mapped for each user based on his group memberships. Does something similar to the label command exist to rename mapped network drives?----------------------- Greetings from Germany, Martin
April 28th, 2011 4:09am

Hi, Thanks for posting in Microsoft TechNet forums. With regarding to script writing, The Official Scripting Guys Forum and their blog would be a better place to address your issue. The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding. Best Regards Magon Liu TechNet Subscriber Support in forum. If you have any feedback on our support, please contact tngfb@microsoft.com Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Free Windows Admin Tool Kit Click here and download it now
April 29th, 2011 9:13am

Hi, As this thread has been quiet for a while, we assume that the issue has been resolved. At this time, we will mark it as ‘Answered’ as the previous steps should be helpful for many similar scenarios. If the issue still persists, please feel free to reply this post directly so we will be notified to follow it up. You can also choose to unmark the answer as you wish. BTW, we’d love to hear your feedback about the solution. By sharing your experience you can help other community members facing similar problems. Thanks for your understanding and efforts. Best Regards Magon Liu TechNet Subscriber Support in forum. If you have any feedback on our support, please contact tngfb@microsoft.com Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
May 6th, 2011 12:53am

Hello everyone, since this post got a lot of hits, I wanted to share my solution(s). On option is to add a few lines to your logon script. Unfortunately, you will have to use either VBS or powershell. The following code snippet is from a VBS script, but anyone with a little experience in scripting powershell can surely convert it. Set objShell = CreateObject("Shell.Application") Set objFile = CreateObject("Scripting.FileSystemObject") 'Benennung der Laufwerke anpassen if objFile.DriveExists("G:\") Then objShell.NameSpace("G:\").Self.Name = "Persönlich" Basically you will automate that right-click-rename-thingy of the Windows Explorer by creating a shell object. With the objShell.NameSpace(DriveLetter) you select the drive like you would do by setting the focus in the GUI. The Self.Name = 'New Name' then sets the new drive label. The other option would be to use a group policy instead of a logon script to connect the drive. You will find the settings under User Configuration --> Settings --> Windows Settings --> Drive Mappings in the group policy editor. Just right click and select New --> Drive Mapping. A new window will pop up allowing you to specify the UNC path to the shre, the drive letter and the label (through the text box 'label as'). Unfortunately the later options is based upon the Group Policy Preference Extentions introduced with Windows Server 2008 and Windows Vista. With SP2 (please, correct me if I am wrong!) or so it should work also under Microsoft Windows XP, but I would suggest extra testing. I hope, somebody will find this information useful. So long!----------------------- Greetings from Germany, Martin
Free Windows Admin Tool Kit Click here and download it now
May 17th, 2011 3:38am

Hi, Thank you very much for this useful information. I believe it will benefit other members this forum. Your time and effort is greated appreciated. Regards,Please remember to click Mark as Answer on the post that helps you, and to click Unmark as Answer if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
May 17th, 2011 3:53am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics