Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need more mapped drives!!

Status
Not open for further replies.

Mich

IS-IT--Management
Dec 26, 2000
452
0
0
US
I've run out of drive letters and need many more. Is there a way to map to aa: or bb: or servera:? I've looked around and can't find a solution to this.

Thanks in advance.

-If it ain't broke, break it and make it better.
 
Can't you use UNC?

eg: \\SERVERNAME\C$\DIRECTORY etc....

------------------------------------------------------------------------------------
"Life is like a box of chocolates, you never know what you're gonna get!"
------------------------------------------------------------------------------------
 
Not that I know of.
If you have any local hard drives besides c:, you could use the disk management MMC to re-map those drives as folders on c: instead of drive letters, giving you an extra drive letter or two.
 
I wish Bill would contemplate the way the Amiga does it. Drives can have more than one character, i.e. Files: ...
 
I could mount drives and free up a couple of letters, but unfortunately I need to free up a lot more than that.

-If it ain't broke, break it and make it better.
 
I'm not sure what your structure is like. For me what I've done is, I made lets say drive G: as a general drive. In this drive i have data that everyone needs to access. So I've just moved folders into that one drive. And given access rights accordingly to users to specific folder(s). Cheezy way to do it, but i have multiple things under one drive.
 
Have you considered using permissions to give/restrict access to specific files rather than mapping a drive letter?

I've used this quite often to isolate file groups.

Regards,
David.
 
Let me explain a litte better why I need this.

I'm a systems admin. In order to test/debug application issues I need my PC configured just like the user's PC. Each of these apps requires one (or more) drives to be mapped. It has come to the point where I've run out of letters to map. Of course, I can disconnect one mapping and map to another server then map back when I need to work with the previous app, but there has to be a better way.

Make sense?

-If it ain't broke, break it and make it better.
 
Well, a couple of thoughts.

Since, obviously, your users don't have 24 drive letters mapped, why not make some batch files... such as:

FredsDrives.bat
net use g: /delete
net use g: \\someserver\somedrive
net use h: /delete
net use h: \\someserver\someotherdrive
@echo Drives mapped like Fred has!

.... at least that way, you'd be a double-click away from "emulating" someone else's drive mappings.


Just my 2¢

"In order to start solving a problem, one must first identify its owner." --Me
--Greg
 
[afterthought]
... Besides, if you're mapping ALL those network drives every time you boot, you must get to work in the morning, turn on your computer, go to coffee, go to lunch, and hopefully by the time you punch out, your computer's all booted up. ;)
[/afterthought]

Hehe....

Just my 2¢

"In order to start solving a problem, one must first identify its owner." --Me
--Greg
 
Mapped volumes is a great suggestion for this. Another solution I would suggest would be to create a script that will disconnect and remap drives based on the testing you need to perform.

For one thing, I think that this would make your testing more valid since the ideal situation would be for you to test applications using the same drive letters that your users will use. That way you don't encounter nay problems with paths in case a programmer did a bone head maneuver and hard coded a path. Hopefully that won't be an issue for you but the reasons for testing in a controlled environment still remain for consistency sake.

THe script you need is very simple. You can easily customize the following I whipped out for you.

Code:
'==========================================================================
'
' NAME: MapDriveList.vbs
'
' AUTHOR: Mark D. MacLachlan , The Spider's Parlor
' URL   : [URL unfurl="true"]http://www.thespidersparlor.com[/URL]
' DATE  : 2/8/2006
'
' COMMENT: <comment>
'
'==========================================================================

Set WSHNetwork = CreateObject("WScript.Network")
dPrompt = "******************************************" & VbCrLf
dPrompt = dPrompt & "What program do you wish to test?" & vbCrLf & "Enter Number or Q to Quit" & vbCrLf 
dPrompt = dPrompt & "1  Application1" & vbCrLf
dPrompt = dPrompt & "2  Application2" & vbCrLf
dPrompt = dPrompt & "3  Application3" & vbCrLf
dPrompt = dPrompt & "******************************************" & VbCrLf

dSelection = mname

WScript.Echo(dSelection)
WScript.quit

Function mname
	dSelection = InputBox(dPrompt,"Map Drives?")
		Select Case ucase(dSelection)
		Case "1"
			WSHNetwork.RemoveNetworkDrive "X:", True, True
			WSHNetwork.MapNetworkDrive "X:", "\\server\executables",True
		
		Case "2"
			WSHNetwork.RemoveNetworkDrive "X:", True, True
			WSHNetwork.MapNetworkDrive "X:", "\\server\executables2",True
		
		Case "3"
			WSHNetwork.RemoveNetworkDrive "X:", True, True
			WSHNetwork.MapNetworkDrive "X:", "\\server\executables3",True
		
		Case "" 'Same as Cancel
			WScript.Quit
		Case "Q"
			WScript.Quit
		
		Case Else
			mname
	End Select
	mname = dSelection
End Function


I hope you find this post helpful.

Regards,

Mark
 
2 thoughts occur:-

1. Dedicated test machine.

2. Dedicated Virtual Machine (eg, VMWARE, MS Virtual Machine)

If you do a lot of testing/debugging, you really need an environment other than what you use for 'normal' working (if there's a budget for this of course!)
 
It sounds to me like you're never re-using a drive letter. Example: you have 40 departments and you're assuming that your network needs 40 drive letters. Most of the time, in this situation you would reuse a letter. Ex: Marketing, Accounting and IS each have a shared files area. Instead of using 3 drive letters, you use GP or login scripts to map the same letter differently for the users in each department: S: points to the marketing share for marketing users, S: points to the IS share for the IS users, etc.

On your test machine, as mentioned by others, you would map your S: drive differently depending on what app you're testing.

_____
Jeff[sub]
[purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day
[/sub][sup]
"The software I buy sucks, The software I write sucks. It's time to give up and have a beer..." - Me[/sup]
 
Forgot to mention:

For the future you should be trying to get rid of drive letters all together. You'll have much more flexibility using UNCs. Also, look at how AD works and addresses things through DNS. Eventually, we will be addressing all resources, even on our internal LANs using URLs.

_____
Jeff[sub]
[purple]It's never too early to begin preparing for [/purple]International Talk Like a Pirate Day
[/sub][sup]
"The software I buy sucks, The software I write sucks. It's time to give up and have a beer..." - Me[/sup]
 
Exactly MasterRacker. That is what my posted script will do. And for the production environment I suggest reading my FAQ faq329-5798.

I hope you find this post helpful.

Regards,

Mark
 
It seems like the best idea so far is a batch/script to execute depending on what app I need to test with. I think I'll write a litte VB app for this.

I agree that going UNC is by far the best way, but so many of the apps require specific drive letters. I'll fuss at the vendors about this and they say they'll correct this "for a small fee".

Test and virtual machines, while certainly do able, aren't practical. Virtual machines take forever to load and tax a machine's resources. If I'm doing some serious testing I'll launch a virtual PC. If I just need to run a quick check I'd rather not have to load a virtual PC. I'd need 25 desktops stashed somewhere if I wanted to have dedicated test machines.

I was hoping it would be as simple a reg hack that would allow me to map to drives such as AA: or serverA:, but I guess not. Looks like I'll work on scripting this.

Thanks for all of the suggestions.

-If it ain't broke, break it and make it better.
 
I think he just means he'd rather use a compiled app than a script. Your code would work with little modification in an actual VB app as well.
 
Ditto jasen

-If it ain't broke, break it and make it better.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top