Click here to Skip to main content
15,885,365 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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
Updated 25-Jun-13 9:35am
v3
Comments
Mahesh Bailwal 26-Jun-13 2:15am    
Please share code you have used for local machine.

1 solution

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[^]
 
Share this answer
 
Comments
GB_1114 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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900