VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,798 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hello
I'm using this code to get the BIOS version:
Dim Search2 As New ManagementObjectSearcher(New SelectQuery("Win32_BIOS"))
For Each Info2 As ManagementObject In Search2.Get
If Info2("SMBIOSBIOSVersion") IsNot Nothing Then MsgBox Info2("SMBIOSBIOSVersion").ToString
Next
On systems without SMBIOS that have SMBIOSPresent set to False, will above code raise any exception?
I mean just checking If Info2("SMBIOSBIOSVersion") IsNot Nothing is enough?
Or should also check If Info2("SMBIOSPresent") IsNot Nothing AndAlso Convert.ToBoolean(Info2("SMBIOSPresent")) = True before going to get the SMBIOS version?
Thanks for advise :)