Pelo ID do processador:
**********************************************
Local oTrava, oObjeto, xMsg := ""
oTrava := WmiService()
For Each oObjeto In ;
oTrava:ExecQuery( "SELECT * FROM Win32_Processor" )
xMsg := "ID: " + oObjeto:ProcessorID
Next
MsgInfo( xMsg )
Pelo Signature do HD:
**********************************************
Local oTrava, oObjeto, xMsg := ""
oTrava := WmiService()
For Each oObjeto In ;
oTrava:ExecQuery( "SELECT * FROM Win32_DiskDrive" )
Msg := "Signature: " + LTrim( Str( ABs( oObjeto:Signature ), 20, 0 ) )
Next
MsgInfo( xMsg )
**********************************************
Static Function WmiService()
Static oWmiLocal, oLocator
IF oWmi == Nil
oLocator := CreatObject( "wbemScripting.SwbemLocator" )
oWmi := oLocator:ConnectServer()
EndIf
Return oWmi
Nenhum comentário:
Postar um comentário