本文介绍了从本地计算机访问Windows服务器信息(System.IO)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我正在尝试创建一个控制台应用程序,我正在尝试使用System.IO从本地计算机获取驱动器信息。现在我想从本地机器获取服务器的相同信息,我该怎么做?我该如何连接它?和Connection之后如何访问其System.IO?我知道有一件事可以通过UNC路径访问服务器(\\servername \ name \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\那样做吗? 我已经拥有了用户名和密码。 我们非常欢迎任何帮助。 谢谢, Gb1114 解决方案 您需要的项目称为Windows Management Instrumentation(WMI),而不是System.IO。参见例如 http://code.msdn.microsoft.com/windowsdesktop/Using-WMI-with- C-4e5a9ee1 [ ^ ] 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 解决方案 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[^] 这篇关于从本地计算机访问Windows服务器信息(System.IO)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
08-18 10:34