且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在不使用 WMI 的情况下获取操作系统

更新时间:2023-02-08 12:06:50

您可能会在注册表中找到您要查找的内容.从 Windows 2000 开始,可以在以下位置找到 ProductName 值:HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion.

You will probably find what you are looking for in the registry. As of Windows 2000 the ProductName value can be found in this location: HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion.

要使用 Powershell 查询此注册表值,请尝试:

To query this registry value using Powershell, try:

(get-itemproperty -Path "HKLM:\SOFTWARE\Microsoft\Windows NT\CurrentVersion" -Name ProductName).ProductName