<p>Is there a way, within the .net framework, to check to see if two different shared folders are actually pointing to the same physical directory?  Do directories in Windows have some sort of unique identifier?  Google-fu is failing me.</p>

<p>(I mean, aside from writing a temp file to one and seeing if it appears in the other)</p>

<p>Edit: I think I've discovered what I need,with thanks to Brody for getting me pointed in the right direction in the System.Management namespace.</p>

You can examine the share definition itself by using the System.Management namespace but it is not easy to use.
it starts something like
```
```
ManagementClass management = new ManagementClass("\\\\.\\root\\cimv2", "Win32_Share", null)
```
```
And it gets much worse after that.  I have used it to create a share.  Hopefully you can use it to the path for each share and compare.