Page 1 of 1

BIOS DATE

Posted: Tue Mar 04, 2008 5:03 pm
by Otto
Could someone show me how to get the BIOS date.
Thanks in advance
Otto

Posted: Tue Mar 04, 2008 5:21 pm
by Biel EA6DD
Hi Otto, try this code.

Code: Select all

FUNCTION Main()
   LOCAL oLoc,oWmi,oLis, oBios
   oLoc := CreateObject( "wbemScripting.SwbemLocator" )
   oWmi:=oLoc:ConnectServer()
   oLis := oWmi:ExecQuery( "SELECT * FROM Win32_BIOS " )
   FOR EACH oBios IN oLis
      ?  oBios:Name,;
         oBios:ReleaseDate  //Release date of the Windows BIOS in the Coordinated Universal Time (UTC) format of YYYYMMDDHHMMSS.MMMMMM(+-)OOO.
   NEXT
RETURN NIL

Posted: Wed Mar 05, 2008 7:08 am
by Otto
Is CREATEOBJECT a xHarbour function?


Error: Unresolved external '_HB_FUN_CREATEOBJECT' reference

Thanks in advance
Otto

Posted: Wed Mar 05, 2008 9:29 am
by Antonio Linares
Otto,

With current FWH 8.02 and xHarbour/Harbour, Biel's sample is linking and running fine

Posted: Wed Mar 05, 2008 9:34 am
by Silvio
Antonio,
How we can make to have the atomic time ?

Posted: Wed Mar 05, 2008 10:41 am
by Otto
Thank you, Antonio. I missed:
echo $(HBDIR)\lib\HbWin32.lib + >> b32.bc

Could someone post pros and cons between the two methods?

oReg := TReg32():New( HKEY_LOCAL_MACHINE, "HARDWARE\DESCRIPTION\System", .f. )
uVar := oReg:Get( "SystemBIOSDate", "" )
oReg:Close()

Thanks in advance
Otto