Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
BIOS serial number
Message
De
26/08/2005 09:21:51
Metin Emre
Ozcom Bilgisayar Ltd.
Istanbul, Turquie
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Versions des environnements
Visual FoxPro:
VFP 7
OS:
Windows XP
Database:
Visual FoxPro
Divers
Thread ID:
01044217
Message ID:
01044270
Vues:
14
Hi Mike,
I tried your code and release date seem empty with my computer installed W2k?




>To correct the date representation you need to use a function like this.
>
>
>
"ReleaseDate: " , WMIDateStringToDate(loItem.ReleaseDate)
>
>Function WMIDateStringToDate(dtmDate)
>WMIDateStringToDate = Ctot(Substr(dtmDate, 5, 2) + "/" + ;
>Substr(dtmDate, 7, 2) + "/" + Left(dtmDate, 4) ;
>+ " " + Substr (dtmDate, 9, 2) + ":" + ;
>Substr(dtmDate, 11, 2) + ":" + Substr(dtmDate, ;
>13, 2))
>Return Transform(WMIDateStringToDate)
>Endfunc
>
>
>
>>I try to get Bios SerialNumber with thi code:
>>
>>
>>local loWMI, loItems, loItem, loLocator
>>CLEAR
>>loLocator		= CREATEOBJECT('WBEMScripting.SWBEMLocator')
>>loWMIService	= loLocator.ConnectServer()
>>loItems			= loWMIService.ExecQuery("Select * from Win32_BIOS where PrimaryBIOS = TRUE")
>>
>>For Each loItem in loItems
>>    ? "Caption: " , loItem.Caption
>>    ? "CurrentLanguage: " , loItem.CurrentLanguage
>>    ? "Description: " , loItem.Description
>>    ? "Manufacturer: " , loItem.Manufacturer
>>    ? "Name: " , loItem.Name
>>    ? "ReleaseDate: " , loItem.ReleaseDate
>>    ? "SerialNumber: " , loItem.SerialNumber
>>    ? "SMBIOSBIOSVersion: " , loItem.SMBIOSBIOSVersion
>>    ? "SMBIOSMajorVersion: " , loItem.SMBIOSMajorVersion
>>    ? "SMBIOSMinorVersion: " , loItem.SMBIOSMinorVersion
>>    ? "SMBIOSPresent: " , loItem.SMBIOSPresent
>>    ? "Status: " , loItem.Status
>>    ? "Version: " , loItem.Version
>>Next
>>
>>
>>and I received something like this:
>>
>> Caption: Award Modular BIOS v6.00PG
>> CurrentLanguage: n|US|iso8859-1
>> Description: Award Modular BIOS v6.00PG
>> Manufacturer: Award Software International, Inc.
>> Name: Award Modular BIOS v6.00PG
>> ReleaseDate: 20030912******.******+***
>> SerialNumber:
>> SMBIOSBIOSVersion: F8
>> SMBIOSMajorVersion: 2
>> SMBIOSMinorVersion: 3
>> SMBIOSPresent: .T.
>> Status: OK
>> Version: GBT - 42302e31
>>Why I don't get SerialNumber and I have "******.******+***" after the Release date?
>>Can someone help me?
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform