Page 1 of 1

Function IsWindows11

PostPosted: Fri Oct 14, 2022 3:27 pm
by Giovany Vecchi
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: Select all  Expand view
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
 

Re: Function IsWindows11

PostPosted: Fri Oct 14, 2022 7:21 pm
by Antonio Linares
Dear Giovany,

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

function Main()

   MsgInfo( cWinVersion() )

return nil

Image