Einige Computerhersteller verwenden im Bios eine eigene Seriennummer, um das Gerät einwandfrei zu kennzeichnen. Bei Dell heißt sie Service-Tag Nummer.
' Heiko Jendreck - personal helpdesk & webdesign
' http://www.phw-jendreck.de
' 2019.05.15 Vers 1.0
' SerialNumber aufrufen mit WScript.Shell
Option Explicit
' Declaration of variables
Dim objWMI, strResult
' Create object
Set objWMI = GetObject("winmgmts://localhost/root/cimv2:Win32_BIOS")
' Search SerialNumber
For each strResult in objWMI.Instances_
' Print SerialNumber - Service-Tag
WScript.Echo "Seriennummer: " & strResult.SerialNumber
Next
' Deallocate used object
Set objWMI = Nothing
' Wir beenden sauber. :)
WScript.Quit()
Getestet wurde das Script mit Windows 10 sowie einem Computer der Marke Dell. Bei anderen System kann es ggf. zu anderen Ausgaben kommen.
Win32_BIOS-WMI-Klasse
Die Win32_BIOS-WMI-Klasse repräsentiert die Attribute der BIOS (Basic Input / Output Services) des Computersystems, die auf dem Computer installiert sind. Es folgt eine Liste der Attribute.
Wscript.Echo "BiosCharacteristics: " & strResult.BiosCharacteristics Wscript.Echo "BuildNumber: " & strResult.BuildNumber Wscript.Echo "Caption: " & strResult.Caption Wscript.Echo "CodeSet: " & strResult.CodeSet Wscript.Echo "CurrentLanguage: " & strResult.CurrentLanguage Wscript.Echo "Description: " & strResult.Description Wscript.Echo "IdentificationCode: " & strResult.IdentificationCode Wscript.Echo "InstallableLanguages: " & strResult.InstallableLanguages Wscript.Echo "InstallDate: " & strResult.InstallDate Wscript.Echo "LanguageEdition: " & strResult.LanguageEdition Wscript.Echo "ListOfLanguages: " & strResult.ListOfLanguages Wscript.Echo "Manufacturer: " & strResult.Manufacturer Wscript.Echo "Name: " & strResult.Name Wscript.Echo "OtherTargetOS: " & strResult.OtherTargetOS Wscript.Echo "PrimaryBIOS: " & strResult.PrimaryBIOS Wscript.Echo "ReleaseDate: " & strResult.ReleaseDate Wscript.Echo "SerialNumber: " & strResult.SerialNumber Wscript.Echo "SMBIOSBIOSVersion: " & strResult.SMBIOSBIOSVersion Wscript.Echo "SMBIOSMajorVersion: " & strResult.SMBIOSMajorVersion Wscript.Echo "SMBIOSMinorVersion: " & strResult.SMBIOSMinorVersion Wscript.Echo "SMBIOSPresent: " & strResult.SMBIOSPresent Wscript.Echo "SoftwareElementID: " & strResult.SoftwareElementID Wscript.Echo "SoftwareElementState: " & strResult.SoftwareElementState Wscript.Echo "Status: " & strResult.Status Wscript.Echo "TargetOperatingSystem: " & strResult.TargetOperatingSystem Wscript.Echo "Version: " & strResult.Version