Hello,
I have a problem, I wrote this code for getting BIOS information but it is not working on Win 98, Do you have any idea why it doesn't work?
Function Get_BIOSSerialNum() As String
Dim strComputer As String, S As String
Dim objWMIService As Object, colItems As Object, objItem As Object
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS", , 48)
For Each objItem In colItems
Get_BIOSSerialNum = Get_BIOSSerialNum & objItem.SerialNumber
Next
End Function
I got the following error in this line <Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")>
Run-Time Error 432: File name or class name not found during automation operation
Thanks a lot for your help.
--Bita
I have a problem, I wrote this code for getting BIOS information but it is not working on Win 98, Do you have any idea why it doesn't work?
Function Get_BIOSSerialNum() As String
Dim strComputer As String, S As String
Dim objWMIService As Object, colItems As Object, objItem As Object
On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS", , 48)
For Each objItem In colItems
Get_BIOSSerialNum = Get_BIOSSerialNum & objItem.SerialNumber
Next
End Function
I got the following error in this line <Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")>
Run-Time Error 432: File name or class name not found during automation operation
Thanks a lot for your help.
--Bita