FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How detect windows 10 ?
Posts: 340
Joined: Thu Jan 25, 2007 03:53 PM
How detect windows 10 ?
Posted: Wed Aug 26, 2015 10:07 AM

HI,

Anyone can help me to detect if running with Windows10 ?

The function ver:=GetVersion()

ver[1] 6
ver[2] 2

It is egual to Windos 8.1 ? (or not)

Any help

tks

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How detect windows 10 ?
Posted: Wed Aug 26, 2015 10:14 AM
Already included in FWH 15.07

Code (fw): Select all Collapse
#define  HKEY_LOCAL_MACHINE  2147483650  // 0x80000002

function IsWindows10()

   local oReg := TReg32():New( HKEY_LOCAL_MACHINE,;
                               "SOFTWARE\Microsoft\Windows NT\CurrentVersion",;
                               .f. )
   local cProductName := oReg:Get( "ProductName" )

   oReg:Close()

return "Windows 10" $ cProductName
regards, saludos

Antonio Linares
www.fivetechsoft.com
Posts: 340
Joined: Thu Jan 25, 2007 03:53 PM
Re: How detect windows 10 ?
Posted: Thu Aug 27, 2015 09:57 AM

Resolved as always

tks

Continue the discussion