必须找到os是服务器还是工作站 [英] Have to find whether the os is server or workstation

查看:103
本文介绍了必须找到os是服务器还是工作站的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好



请参考此链接



OS Name,Version&产品类型 [ ^ ]





我试图找出什么类型的操作系统作为我的输出。

场景在找到它的服务器或工作站时,此链接中的指定失败。

它将win 8和win server 2012的值重新调整为6.2。



你可以帮我解决一下这个问题吗?





谢谢

Prem



我尝试了什么:



我试过在网站上搜索但没有'得到任何解决方案。请帮助我

解决方案

您必须检查内部版本号。可以通过搜索网络找到列表(例如 Windows内部版本号·GitHub [ ^ ])。



[更新]

另请参阅操作系统版本(Windows) [ ^ ]和 IsWindowsServer at 版本帮助程序功能(Windows) [ ^ ]

[/更新]



[更新2]

另见CP文章获取操作系统版本信息 - 即使对于Windows 10! [ ^ ]。

[UPDATE2]


当然,您必须转到WIN32 API ...

GetVersionEx功能(Windows) [ ^ ]

OSVERSIONINFOEX结构 [ ^ ]有一个wProductType成员......答案就在那里。 ..

Hi all

please refer this link

OS Name, Version & Product Type[^]


Im trying to find what type of OS as my output.
The scenario given in this link fails while finding whether its server or workstation.
Its retuning the value as 6.2 for both win 8 and win server 2012.

can u please help me how to fix this issue?


Thanks
Prem

What I have tried:

I have tried searching in sites but didn't get any solution.please help me

解决方案

You must check the build number. A list can be found by searching the web (e.g. Windows build numbers · GitHub[^]).

[UPDATE]
See also Operating System Version (Windows)[^] and IsWindowsServer at Version Helper functions (Windows)[^]
[/UPDATE]

[UPDATE2]
See also the CP article Getting Operating System Version Info - Even for Windows 10![^].
[UPDATE2]


To be sure, you have to go to the WIN32 API...
GetVersionEx function (Windows)[^]
The OSVERSIONINFOEX structure[^] has a wProductType member...The answer is there...


这篇关于必须找到os是服务器还是工作站的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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