Ciao,
volevo chiedere una cosa ma non volevo riprendere un post vecchio.
http://forum.html.it/forum/showthre...ght=seriale+hdd
la funzione per leggere il seriale del hdd per farla funzionare anche sugl'altri SO si devono caricare le librerie wmi.
come si installano?
il codice che ho messo nella mia applicazione è questo e su xp funziona benissimo ma sul 2000 mi da errore.:
'Gestione Seriale----------------------------------------------------------------
Private Function GetSerialInfo(ByVal device As String) As String
Dim objs As Object
Dim obj As Object
Dim WMI As Object
Dim sAns As String = ""
WMI = GetObject("WinMgmts:")
objs = WMI.InstancesOf("Win32_" & device)
For Each obj In objs
sAns = sAns & obj.SerialNumber & vbCrLf
Next
GetSerialInfo = Replace$(sAns, " ", "")
End Function
Function IsWMIInstalled() As Boolean
'----------------------------------------------------------------
' Restituisce True se è presente Microsoft Windows
' Management Instrumentation:
Dim oTemp As Object
On Error Resume Next
oTemp = CreateObject("WbemScripting.sWbemLocator")
IsWMIInstalled = (Err.Number <> 429)
If Err.Number = 429 Then
Err.Clear()
Else
oTemp = Nothing
End If
End Function
'Fine Gestione Seriale-------
cioa david