I'm writing a little app to save the clipboard to a file and then mail a link to it to selected recipients. For the saved file to be accessible by the recipients, I verify that the parent folder is shared. However, if the share is on a local drive, I have to convert the full path to something like: DriveID:\SomePath1\SharedFolderName\SomePath2\FileName.ext and then to: \\HostDNSname\ShareName\SomePath2\FileName.ext where ShareName is the provider name for: DriveID:\SomePath1\SharedFolderName and SharedFolderName is the 'deepest' level share - i.e., it accounts for the possibility of SomePath1 including higher level shared folders. I'm using the Win32_LogicalDisk ManagementClass and Win32_Share ManagementClass to obtain the info I need, but have not found an easy way to do the path conversion. Before I dig into the implementation, I thought I'd check to see whether anyone has attempted this and whether they found an easy way to do this. Comments would be appreciated...
emilG "Dealing with failure is easy: Work hard to improve. Success is also easy to handle: You've solved the wrong problem. Work hard to improve." - Alan Perlis