Figuring out the Subst magic

So, I’ve got a problem and I’m hoping someone out there can help. I live on the command-line all day, and to make life easier, I use subst quite a bit. Generally for stuff like this: subst p: c:\somepath
What I’d like to be able to do is reverse the subst mapping from within c# code. That is, if I have the directory p:\foo\bar, I’d like to be able to figure out that it’s really c:\somepath\foo\bar\ I need to do this because I have to tell some server-based processes where to look for diferrent things and those server processes don’t know anything about my subst setup (nor should they). Apparently ProcessExplorer and Handle over on the SysInternals site do this, so it is possible at some level.

Anyone have any ideas?

Your post must include a link to this post.

How does this work?
Write a response on your own website and include a link to this post. Then submit your response’s URL here. Your response may appear here after moderation. To update or remove it, edit or delete your original post and submit the same URL again. Learn more about Webmentions.