uses Registry
{
"SystemRoot"="C:\\WINDOWS"
"BuildBranch"="th1"
"CurrentBuild"="10240"
"CurrentMajorVersionNumber"=dword:0000000a
"CurrentMinorVersionNumber"=dword:00000000
"CurrentType"="Multiprocessor Free"
"CurrentVersion"="6.3"
"EditionID"="Professional"
"InstallationType"="Client"
"InstallDate"=dword:55c2702f
"ProductName"="Windows 10 Pro"
"RegisteredOrganization"=""
"SoftwareType"="System"
"UBR"=dword:0000401d
"PathName"="C:\\WINDOWS"
"ProductId"="00330-80000-00000-AA401"
"CurrentBuildNumber"="10240"
"BuildLab"="10240.th1.150729-1800"
"BuildLabEx"="10240.16412.amd64fre.th1.150729-1800"
"BuildGUID"="ffffffff-ffff-ffff-ffff-ffffffffffff"
"InstallTime"=hex(b):fb,0c,58,40,bc,cf,d0,01
"Customizations"="ModernApps"
"RegisteredOwner"="Gerd"
}
function ErmittleWindows10Build: String;
var Reg: TRegistry;
begin
Result := ''; try
Reg := TRegistry.Create(KEY_READ);
try Reg.RootKey := HKEY_LOCAL_MACHINE;
if Reg.OpenKeyReadOnly('SOFTWARE\Microsoft\Windows NT\CurrentVersion') then
begin
Form1.Label1.Caption := Reg.ReadString('ProductName');
Form1.Label2.Caption := Reg.ReadString('EditionID');
Form1.Label3.Caption := Reg.ReadString('DisplayVersion');
Form1.Label4.Caption := Reg.ReadString('CurrentVersion');
Form1.Label5.Caption := Reg.ReadString('ReleaseId');
Form1.Label6.Caption := Reg.ReadString('CurrentBuild');
Reg.CloseKey;
end;
finally
Reg.Free;
end;
except
end;
end;
Beispiel :
procedure TForm1.Button2Click(Sender: TObject);
begin
ErmittleWindows10Build;
end;
Keine Kommentare:
Kommentar veröffentlichen