public static int Main(string[] args) { CifsSessionManager.SetDebugLevel(6); CifsSessionManager.SetDebugFile("cifs.log"); DoRemoteAdmin(); return(0); }
private static void DoRemoteAdmin() { var login = new CifsLogin("guest", null); ICifsRemoteAdmin ra = null; try { // in this example, "test" is the session name, "athena" the hostname. // you can enter any validly resolving entry for the hostname (IP, computername, etc) ra = CifsSessionManager.ConnectRemoteAdmin("test", "athena", login); ShowServer(ra); Console.WriteLine("\nShare's"); DoShares(ra); Console.WriteLine("\nWorkstation Info"); DoWInfo(ra); Console.WriteLine("\nServer Info"); DoSInfo(ra); Console.Read(); // pause ICifsSession s = ra; s.Disconnect(); } catch (Exception) // ignore all { if (ra != null) { ICifsSession s = ra; s.Disconnect(); } } }