Matthew Hipkin

Detect Windows 10 using FreePascal

Here is a quick and dirty way to detect Windows 10 using FreePascal.

function IsWin10: Boolean;
var
 output: String;
begin
 output := '';
 Result := false;
 if RunCommand('cmd.exe',['/C','ver'],output) then
 begin
   if AnsiPos('[Version 10',output) > 0 then Result := true;
 end;
end;

This function requires the Process unit to be present in your uses clause.

blog comments powered by Disqus