How do I convert a path with a drive letter to a UNC path

半腔热情 提交于 2019-12-04 00:46:32

You can use P/Invoke and call on a native function such as WNetGetUniversalName.

To get a list of the shared folders on the current machine in .NET you have to options:

Note that the calling process will have run in the context of a user with administrative privileges for this to work.

goku_da_master

To answer your question about net use here is a good solution Get UNC Path for Mapped Drive VB.net

I like the net use way.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!