nicedreams Posted January 8, 2008 Share Posted January 8, 2008 Is there a way to use "net use" and be able to custom name the share? For example you normally have this in My Computer for drive listings: Groups on '192.168.200.214' (Y:) Data on '192.168.200.252' (X:) I want to be able to customize the name when using "net use" so it would be like: Group Access Folder (Y:) Finance Data on Terminal (X:) I've been searching Google for a while and I thought there was a way to do this, but forgot. The closest I can think of (that doesn't work) would be like: net use x: \\192.168.200.214\groups "Group Access Folder" Link to comment https://www.neowin.net/forum/topic/612139-net-use-with-comments/ Share on other sites More sharing options...
Antaris Veteran Posted January 8, 2008 Veteran Share Posted January 8, 2008 The 'net use' command does not include a switch which enables you to do this. You would need to do this manually (or scripted) later. Link to comment https://www.neowin.net/forum/topic/612139-net-use-with-comments/#findComment-589120804 Share on other sites More sharing options...
nicedreams Posted January 8, 2008 Author Share Posted January 8, 2008 You wouldn't happen to know how to do that would you? Link to comment https://www.neowin.net/forum/topic/612139-net-use-with-comments/#findComment-589120807 Share on other sites More sharing options...
AnthonySterling Posted January 8, 2008 Share Posted January 8, 2008 Could you not just rename the drive once mounted? 1) Mount the drive. {net use} 2) Check its mounted. {if exist} 3) Rename the drive. {ren or rename i think, sorry I can check I'm not on a windows machine} or am i thinking you're requiring something not immediately obvious? :blush: SilverB. Link to comment https://www.neowin.net/forum/topic/612139-net-use-with-comments/#findComment-589120833 Share on other sites More sharing options...
c.grz Posted January 8, 2008 Share Posted January 8, 2008 set renameShell = createObject("shell.application") mappedDrive = "P:\" 'Your drive letter renameShell.nameSpace(mappedDrive).self.name = "Drive Name" Create a vbs file and edit it accordingly. Link to comment https://www.neowin.net/forum/topic/612139-net-use-with-comments/#findComment-589120839 Share on other sites More sharing options...
+orgitnized Subscriber¹ Posted January 8, 2008 Subscriber¹ Share Posted January 8, 2008 Yep, TheReasonIFailed has a similar setup to my code. I use AutoIT to do this task - sometimes people want it done on machines that aren't part of a corporate network and I'll add it to run during startup. Only difference is my code's a little different because I use AutoIT to do it. Nice and easy though, either way ;) Link to comment https://www.neowin.net/forum/topic/612139-net-use-with-comments/#findComment-589120871 Share on other sites More sharing options...
nicedreams Posted January 8, 2008 Author Share Posted January 8, 2008 I'll play around with that code and see how it work for me. I have 100+ people on the network so I need to try it in my lap later. Link to comment https://www.neowin.net/forum/topic/612139-net-use-with-comments/#findComment-589120936 Share on other sites More sharing options...
Recommended Posts