通过使用系统名称获取操作系统. [英] Get the Operating System by using system Name.

查看:111
本文介绍了通过使用系统名称获取操作系统.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网络中的系统(PC)名称的列表,我需要使用系统名称来获取安装在这些系统中的操作系统的类型.通过C#代码提供帮助.

I Have a list of system(PC) Names which are in my network I need to get the type of Operating System installed in those systems by using system Names. Help through C# code.

推荐答案

如果预期所有程序都在运行Windows,则可以通过连接到计算机上的注册表提供程序来获取它(winmgmts:\\ < targetmachine> \ StdRegProv),然后从HKEY_LOCAL_MACHINE配置单元获取数据,或者直接使用WMI类Win32_OperatingSystem类.
如果您还谈论其他操作系统,则没有标准的方法来安装操作系统.您必须使用多种技术来获得O/S,但是您不能保证100%的准确性(如果有的话).
If everything is expected to be running Windows, you can either get it by connecting to the registry provider on the machine (winmgmts:\\<targetmachine>\StdRegProv) over WMI and getting the data from the HKEY_LOCAL_MACHINE hive, or use the WMI class Win32_OperatingSystem class directly.

If you''re talking about other operating systems as well, there is no standard way of getting the O/S that''s installed. You''ll have to use a variety of techniques to ATTEMPT to get the O/S, but you cannot guarantee 100% accuracy, if any at all.


这篇关于通过使用系统名称获取操作系统.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆