Re: use a drives guid instead of its letter - where is the drive root ?
"R.Wieser" <[email protected]>
| Newsgroups | alt.comp.os.windows-xp,alt.windows7.general |
|---|---|
| Organization | A noiseless patient Spider |
| Message-ID | <[email protected]> |
Vanguard,
> Is the GUID assigned to a drive under one instance of the OS that
> same GUID that gets assigned to the same drive under different
> instances of the OS?
I've yet to test that, but I'm assuming it changes. That doesn't matter
though, as I'm looking to uniquely identify the drive on my current 'puter.
In fact, not being able to find the drive (by its current GUID) on another
'puter might even be a good thing.
> An alternate means of identifying a USB drive is to put a file
> that is unique to that drive,
Yes, thats how I currently do it. Iterating thru all drives looking for
that particular file (and contents).
> As you've discovered, UNCs are not to point at root folders of drives.
You could do worse than to explain how you hopped from a drive GUID to an
UNC ...
But yes, I also saw the similar behaviour.
> Since the simplest form is \\server\path, maybe (just a guess) you
> could use the relative pathing of ".." to refer back a directory level,
Alas, I already tried that and it didn't work.
and FYI :
echo hello> \\?\Volume{guid}\bla.txt
works
del \\?\Volume{guid}\bla.txt
doesn't ("The parameter is incorrect").
IOW, its not really consistent.
I have not got an UNC available to check if it behaves the same.
Regards,
Rudy Wieser