سؤال

How do I list a computer's remotely shared files using C#?

Could someone help me with this?

[Update]: Done it by exe "NET VIEW" command in C# code finally.

هل كانت مفيدة؟

المحلول

I'd look at the Win32_Share WMI class. If you haven't used WMI from C# before, this codeproject article should show you how to get started: Howto: (Almost) Everything in WMI via C# - Part 1: Registry

This Technet article has a sample VBScript for enumerating shared: Enumerating Shared Folders
Just change strComputer in that sample to be the computer you're interested in.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top