Maintainable (permanent) drive paths in Windows?

Posted by: hybrid8

Maintainable (permanent) drive paths in Windows? - 04/07/2008 13:56

This post is somewhat inspired by the recent topic of naming a CD drive, but mostly out of my own frustration with Windows, an OS still stuck in 1984 unfortunately.

My issue is being able to consistently access specific drives on a particular Windows machine using the same convention. I don't so much care what that convention is, it just has to be consistent.

The problem... Rebooting my Windows system sometimes causes drives to come up with different drive letters which makes them lose their network share properties, including names.

I have one external USB drive always connected to my Windows PVR/server. 50-80% of the time I also have an additional external drive connected. The main complication I think may be that these disks are formatted HFS+ (for the Mac) and I am using MacDrive to let Windows see/use them.

I have always used Disk Management to give these disks specific drive letters. I've also enabled sharing on them and given them specific share names. They've been accessible on the machine itself using these drive letters as well as their share (UNC) paths. For example, my music disk is assigned drive letter "S" and a share name of "Media300" allowing it to be accessed as "\\tvpc\Media300"

The volume name of the actual disk is also Media300, but that doesn't seem to mean anything at all in Windows.

I believe the new version of MacDrive is preventing the drive from coming back as "S" after a reboot. Instead it gets mapped to "H" and my other drive instead of coming up as "M" (as I've assigned it) also resets to "I"

As you can imagine this is a huge issue because different server software (like my music server and PVR software) want to access these drives in some consistent manner that's been defined in their prefs/settings. When the drive letters change the software fails to see the drives and they also disappear from view for all networked machines since they no longer have share properties. That also means they can't be accessed by UNC path from the host machine itself.

Even if I were to be content with the drive letter assigned by Windows, this could also be a problem with re-plugging disks in a different order, causing drive letters not to match up to the previous plugging.

Does anyone have any creative solutions to this issue? Perhaps a start-up program that can reset my shares and drive letters (to whatever I define) based on Volume Name or even Volume ID?


Posted by: tfabris

Re: Maintainable (permanent) drive paths in Windows? - 04/07/2008 14:25

Silly idea. After installing the new version of macdrive, did you go back into disk management and re-assign the drive letter a second time?
Posted by: Attack

Re: Maintainable (permanent) drive paths in Windows? - 04/07/2008 14:42

USBDLM (USB Drive Letter Manager) might help you but I don't know since your using HFS+ on the drives.
Posted by: hybrid8

Re: Maintainable (permanent) drive paths in Windows? - 04/07/2008 14:43

Originally Posted By: tfabris
Silly idea. After installing the new version of macdrive, did you go back into disk management and re-assign the drive letter a second time?


Yes. smile I have to keep going back to do it every time I restart the system. I also have to continually set up the shares too. That's why I'm looking for some permanent way to reference those disks.

I'd love a way to reference them regardless of drive letter, but it seems Windows is intrinsically tied to them. Sort of counter productive when drive letters are variable.

But I suspect my only option will be to find some way to automate the resetting of the letters and shares, either through some application or script that can be fired off when the machine boots or logs in.

Posted by: tfabris

Re: Maintainable (permanent) drive paths in Windows? - 04/07/2008 15:37

What about just throwing up your hands and leaving them as H and I, and then redoing the share maps?

Probably because they don't *always* come up like that, huh?

I could also imagine writing a batch file or a VBscript file that enumerated all drives, got all of their volume labels, then created a share once it found the desired volume label. But I agree, you shouldn't have to do that.
Posted by: hybrid8

Re: Maintainable (permanent) drive paths in Windows? - 04/07/2008 16:44

Originally Posted By: Attack
USBDLM (USB Drive Letter Manager) might help you but I don't know since your using HFS+ on the drives.


I'm going to give this a try. From the information on the web page it sounds like it may work. I'll update once I've given it a shot.
Posted by: hybrid8

Re: Maintainable (permanent) drive paths in Windows? - 04/07/2008 17:27

USBDLM works for giving the drives the letters I want. YAY! But, my share settings for those drives still disappear after every reboot. I don't know what to do about that. Any tools out there to automate the share settings?
Posted by: wfaulk

Re: Maintainable (permanent) drive paths in Windows? - 04/07/2008 17:48

Maybe try attaching it to another directory as a junction and then share that directory? I don't know that that will work; it's just a guess. I'm also not 100% sure that junctions will survive reboots, but I think they do.
Posted by: tfabris

Re: Maintainable (permanent) drive paths in Windows? - 04/07/2008 18:02

There's got to be a Dos command for making shares. At the very least a vbscript commannd. (I mean, for automating the process on each reboot.)
Posted by: tfabris

Re: Maintainable (permanent) drive paths in Windows? - 04/07/2008 18:05

Code:
net share /?
The syntax of this command is:

NET SHARE
sharename
          sharename=drive:path [/GRANT:user,[READ | CHANGE | FULL]]
                               [/USERS:number | /UNLIMITED]
                               [/REMARK:"text"]
                               [/CACHE:Manual | Documents| Programs | None ]
          sharename [/USERS:number | /UNLIMITED]
                    [/REMARK:"text"]
                    [/CACHE:Manual | Documents | Programs | None]
          {sharename | devicename | drive:path} /DELETE
          sharename \\computername /DELETE
Posted by: hybrid8

Re: Maintainable (permanent) drive paths in Windows? - 04/07/2008 18:19

Thanks guys!

I had also just found RMTSHARE a little while ago and was coming online now to post about it. That site says that RMTSHARE is the preferable command because it can also issue permissions, but I have yet to try it (I had to make a quick sandwich smile ). The syntax for NET SHARE also seems to indicate it can handle perms though, so I don't know what's up.

EDIT: But I can't seem to do what I need with RMTSHARE and "NET SHARE" seems to work fine with the free-wheeling permissions I need.

The syntax and errors (and file name) make me think it's only for remote shares. So it will map a drive letter to a share versus creating a share from an existing drive letter.

Thanks again. Now I just have to throw this into a batch file.
Posted by: hybrid8

Final Solution - 04/07/2008 19:39

The final solution seems to be working great.

On startup, USBDLM assigns the proper drive letters to each drive based on its Volume label. And then, based on the arrival of each assigned letter, a batch file is run (also by USBDLM) which sets up the sharing.

Sweet. wink

Posted by: Attack

Re: Final Solution - 04/07/2008 20:41

I'm glad I could help. I found this program on www.shellcity.net and would recommend others to check it out.
Posted by: gbeer

Re: Final Solution - 06/07/2008 02:33

Like Wiki on a Stick

A single page, self editing, self contained personal Wiki. Can be served from a web server but only allows editing if opened as file://
Posted by: gbeer

Re: Final Solution - 06/07/2008 03:56

Also found PixelFormer for making ico files.