Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0
Hi,
 
I am trying to make a console application in which I am trying to get the drive information from the local machine using System.IO. Now I want to get the same information for a server from my local machine, how do I do that? How do I connect to it? and After Connection how do I access its System.IO? I know one thing that the servers can be accessed through UNC path(\\servername\name\dir\) but If I want to access the server disk spaces(using System.IO) and error logs how do I do that?
I already have username and passwords for it.
Any help on this is most welcome.
Thanks,
Gb1114
Posted 25-Jun-13 10:02am
GB_1114256
Edited 25-Jun-13 10:35am
v3
Comments
Mahesh Bailwal at 26-Jun-13 2:15am
   
Please share code you have used for local machine.

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

The item you need is called Windows Management Instrumentation (WMI), not System.IO. See e.g. http://code.msdn.microsoft.com/windowsdesktop/Using-WMI-with-C-4e5a9ee1[^]
  Permalink  
Comments
GB_1114 at 26-Jun-13 15:03pm
   
HI Bernhard, thanks lot for this, I'll implement this and see if it works, on the msdn website it says that "There are no special requirements to build this sample. It uses .NET 4.0"..I have 4.5, I hope it works on that too?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 240
1 Kamal Rocks 184
2 PIEBALDconsult 150
3 BillWoodruff 148
4 Jochen Arndt 135
0 OriginalGriff 5,695
1 DamithSL 4,506
2 Maciej Los 4,007
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 26 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100