By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,896 Members | 1,997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,896 IT Pros & Developers. It's quick & easy.

Convert UNC to local path on remote machine

P: n/a
It seems like a simple question, but I am unable to find any succinct answer
to this problem.

If I am provided a UNC, how can I convert it to it's absolute path on the
remote machine.

For example, machine MyServerA has a share created on a folder
c:\stuff\photos and it is called "SharedPhotos".

What code is required so that when executed on machine MyServerB, given the
UNC \\MyServerA\SharedPhotos, I will get a result of c:\stuff\photos?
I am using the 2.0 framework, so if there are any new classes that I can
leverage with this release, then feel free to enlighten me.

Given that I will not have any credentials provided outside the current
WindowsIdentity of the user logged into MyServerB, will there be any
permission issues when executing the code?

Thanks in advance for any help.

Cheers, Ian


Sep 28 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
If you type \\MyServerA\SharedPhotos from MyServerB Windows Explorer and is
fine then it should be fine.

chanmm

"Ian Williamson" <Ia***********@discussions.microsoft.comwrote in message
news:4A**********************************@microsof t.com...
It seems like a simple question, but I am unable to find any succinct
answer
to this problem.

If I am provided a UNC, how can I convert it to it's absolute path on the
remote machine.

For example, machine MyServerA has a share created on a folder
c:\stuff\photos and it is called "SharedPhotos".

What code is required so that when executed on machine MyServerB, given
the
UNC \\MyServerA\SharedPhotos, I will get a result of c:\stuff\photos?
I am using the 2.0 framework, so if there are any new classes that I can
leverage with this release, then feel free to enlighten me.

Given that I will not have any credentials provided outside the current
WindowsIdentity of the user logged into MyServerB, will there be any
permission issues when executing the code?

Thanks in advance for any help.

Cheers, Ian


Sep 29 '06 #2

P: n/a

"Ian Williamson" <Ia***********@discussions.microsoft.comwrote in message
news:4A**********************************@microsof t.com...
It seems like a simple question, but I am unable to find any succinct
answer
to this problem.

If I am provided a UNC, how can I convert it to it's absolute path on the
remote machine.

For example, machine MyServerA has a share created on a folder
c:\stuff\photos and it is called "SharedPhotos".

What code is required so that when executed on machine MyServerB, given
the
UNC \\MyServerA\SharedPhotos, I will get a result of c:\stuff\photos?
I am using the 2.0 framework, so if there are any new classes that I can
leverage with this release, then feel free to enlighten me.

Given that I will not have any credentials provided outside the current
WindowsIdentity of the user logged into MyServerB, will there be any
permission issues when executing the code?

Thanks in advance for any help.
Off the top of my head I'm not sure this kind of thing would be possible, as
it could conceivably be a security risk for machine A. The information will
be somewhere on A of course (you can see all of them in Manage My Computer,
System Tools, Shared Folders, Shares. You might find this is available via
WMI but again, you'd need the relevant permissions on machine A to get this.
Sep 29 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.