Skip to content

Commit

Permalink
Fixed #5966: Add new GetWindowsProductId function to JclSysInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
ahausladen committed Jan 2, 2024
1 parent 4b319dc commit ba1a772
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions jcl/source/common/JclSysInfo.pas
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ function GetDomainName: string;
{$IFDEF MSWINDOWS}
function GetRegisteredCompany: string;
function GetRegisteredOwner: string;
function GetWindowsProductId: string;
function GetBIOSName: string;
function GetBIOSCopyright: string;
function GetBIOSExtendedInfo: string;
Expand Down Expand Up @@ -2471,6 +2472,15 @@ function GetRegisteredOwner: string;
Result := ReadWindowsCurrentVersionStringValue('RegisteredOwner', '', True);
end;

function GetWindowsProductId: string;
begin
{ TODO : check for MSDN documentation }
if IsWinNT then
Result := ReadWindowsNTCurrentVersionStringValue('ProductId', '', True)
else
Result := ReadWindowsCurrentVersionStringValue('ProductId', '', True);
end;

{ TODO: Check supported platforms, maybe complete rewrite }

function GetUserDomainName(const CurUser: string): string;
Expand Down

1 comment on commit ba1a772

@mr-koya
Copy link

@mr-koya mr-koya commented on ba1a772 Apr 5, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

###what;s this all about?
##ho
#hi

Please sign in to comment.