Re: use a drives guid instead of its letter - where is the drive root ?
JJ <[email protected]>
| Newsgroups | alt.comp.os.windows-xp,alt.windows7.general |
|---|---|
| Organization | To protect and to server |
| Message-ID | <[email protected]> |
On Wed, 1 May 2024 13:03:01 +0200, R.Wieser wrote:
> Hello all,
>
> Using XPsp3 :
>
> I have an USB drive, which I want to refer to by its guid - so that if its
> drive letter changes (because of other USB drives) I can still dependently
> talk to it (from within a script).
>
> The thing is, when I use the result of "mountvol.exe" I can access the
> contents of any folder on the drive, but not the contents of its root.
>
> Question: what do I have to write/do to access its root (do a "dir" on it) ?
>
> Reference:
>
> https://superuser.com/questions/465730/access-to-a-disk-drive-using-volume-id-instead-of-a-drive-letter-in-windows
>
> In the above the "start \\?\Volume{guid}\" method to open the drive doesn't
> work for me. However, "start \\?\Volume{guid}\foldername" does.
>
> Regards,
> Rudy Wieser
Without additional software, the only way is to assign a drive letter to the
mount point path, and access the root using the drive letter.
Without using a drive letter, junction or symlink (Symbolic Link) in NTFS
drive which point to the mount point path can be used. Access the
junction/symlink to access the mount point root. But in Windows XP,
additional software is needed for creating junction/symlink, since Windows
XP doesn't have any built in tool for it (Vista+ already have it).
I believe GNU has a tool for creating junction/symlink, but I don't know the
name of the tool. Alternatively, there's a freeware named "Symlink" which
can create junction/symlink. Japanese made, but the software is in English.
https://emk.name/#download
But in Windows XP, symlink functionality will need the provided driver
(which is only available in 32-bit). Windows XP doesn't need additional
driver for junction functionality, so junction can simply be used instead of
symlink.