0

I'm using some com objects and the path returned is ::{031E4825-7B94-4DC3-B131-E946B44C8DD5}\Documents.library-ms.

Is there a C# function that can automatically resolve this to its normal path

C:\Users\my pc\Documents?

System.IO.Path.GetFullPath does not work.

John
  • 5,942
  • 3
  • 42
  • 79
  • 1
    Well normally you would use [`SHGetPathFromIDList`](https://learn.microsoft.com/en-us/windows/win32/api/shlobj_core/nf-shlobj_core-shgetpathfromidlista) but the path you mentioning looks more like a shell namespace prefix with a regular string attached to it –  Aug 02 '21 at 00:24
  • It was returned from powershell using `$Shell = New-Object -ComObject shell.application` and `$shell.windows().item(0).document.folder.self.path` with my explorer window being on Library\Documents – John Aug 02 '21 at 01:20

0 Answers0