How to identify Win7 Home Premium, Win7 Professional, Win7 Enterprise, or Win7?

How to identify Win7 Home Premium, Win7 Professional, Win7 Enterprise, or Win7?

+3
source share
9 answers

Determine the version and version of Windows

Check this box Detect OS version and see if it helps. This is for XP, but it should help you a bit.

Check it out too http://andrewensley.com/2009/06/c-detect-windows-os-part-1/ and this one for Vista .

+2
source

He noted the issue using win32 api.

GetVersionEx () et al. Is what you need. See This Code Example for a more detailed example.

+1

"Edition" HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion Windows, , ? .

EditionID = EditionID = ID = EditionID = Premium

+1

Delphi Windows XP ,

var 
  Reg : TRegistry
begin
  Reg := TRegistry.Create();
  Reg.RootKey := HKEY_LOCAL_MACHINE;
  Reg.OpenKey('Software\Microsoft\Windows NT\CurrentVersion', false);
  Caption := Reg.ReadString('ProductName');
  Reg.Free;
end

+1

WMI: host localhost, namespace root\cimv2 ( ) SELECT Caption FROM Win32_OperatingSystem

0

, ;)

0

, , , . ( ), , , Microsoft Windows.

Windows Vista - 6.0, Windows 7 - 6.1, 7. .

, . , Windows Vista/7 home basic . .., .

MSDN , , . , , Windows. dll, Windows ..

Windows 7 DLL system32 Vista. , DLL, , Windows 7 , xp/vista.

0

GetVersionEx , , , , SKU. , , - . OSVERSIONINFOEX docs

Microsoft . GetProcAddress API, .

0

, , powershell :

(gwmi -class Win32_OperatingSystem).name

Which returns a string, for example:

Microsoft Windows 7 Enterprise |C:\Windows|\Device\Harddisk0\Partition2

if you want version numbers etc. use a detailed form like

gwmi -class Win32_OperatingSystem | FL *

and choose what you need

0
source

Source: https://habr.com/ru/post/1723314/


All Articles