My laptop has no BIOS serial number (1 Viewer)

nector

Member
Local time
Today, 17:08
Joined
Jan 21, 2020
Messages
368
How do I put the serial showing on my back side of my hardware into my windows system so that when I use the code below I will be able to retrieve it:

C\ WMIC BIOS GET SERIALNUMBER

Unfortunately the manufacture forgot to save the serial number of my laptop so I want it saved into the system, any idea.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 22:08
Joined
May 7, 2009
Messages
19,237
this function will return the pc serial number:
Code:
Public Function PCSerialNumber() As String
Dim strComputer As String
Dim objWMIService As Object
'Dim colSettings As Object
'Dim objComputer As Object
Dim objItem As Object
Dim colItems As Object
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery( _
    "SELECT * FROM Win32_ComputerSystemProduct")
For Each objItem In colItems
    'Debug.Print "Serial Number: " & objItem.IdentifyingNumber
    PCSerialNumber = objItem.IdentifyingNumber
Next
End Function
 

nector

Member
Local time
Today, 17:08
Joined
Jan 21, 2020
Messages
368
What I want is to put back the serial number, for example see the attached photo. Whenever I use bios the function return blank instead of the computer details or serial number
SERIAL NUMBER.png
 

Users who are viewing this thread

Top Bottom