FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Function IsWindows11
Posts: 244
Joined: Mon Jun 05, 2006 09:39 PM
Function IsWindows11
Posted: Fri Oct 14, 2022 03:27 PM
For now it is not a specific function to verify the presence of Windows 11. For those who need to verify this version, I made this temporary function.

Code (fw): Select all Collapse
function IsWindows11()
   local oReg := TReg32():New( HKEY_LOCAL_MACHINE,;
                               "SOFTWARE\Microsoft\Windows NT\CurrentVersion",;
                               .F. )
   local cProductName := oReg:Get( "ProductName" )
   Local lc_nCurrentBuild := Val(oReg:Get("CurrentBuildNumber"))
   Local lc_lRet11 := .F.

   oReg:Close()

   If "Windows 10" $ cProductName .and. lc_nCurrentBuild >= 22000
         lc_lRet11 := .T.
   EndIf

return lc_lRet11
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Function IsWindows11
Posted: Fri Oct 14, 2022 07:21 PM
Dear Giovany,

FWH already supports Windows 11 from function cWinVersion():
Code (fw): Select all Collapse
#include "FiveWin.ch"

function Main()

   MsgInfo( cWinVersion() )

return nil

regards, saludos

Antonio Linares
www.fivetechsoft.com

Continue the discussion