Listing mapped network directories in VB.NET
How do I get all of the mapped network drives (shared ones) like the ones that a person would see in Windows Explorer?
开发者_高级运维That is,
- Network Places
- Computer 1
- Shared Folder
- Computer 2
- Shared Folder 1
- Shared Folder 2
- Computer 1
Is there a command or an API function that I can use to get at least the names of the computers and its folders?
You can find a good ready-to-use solution in Network Shares and UNC paths (at The Code Project).
If you want to do it yourself, I think using WMI would be the way to go.
Also check Mapped network drives cannot be listed in C# for more information.
精彩评论