top of page

Market Research Group

Public·110 members
Elijah Hernandez
Elijah Hernandez

Wmic Bios Get Serial Number Vb Script Mid

On Error Resume NextConst ForReading = 1Const ForWriting = 2dim strmanufacturerdim strserialdim strbiosverdim strmodeldim strprodid'get the computer nameSet wshShell = WScript.CreateObject( "WScript.Shell" )strComputerName = wshShell.ExpandEnvironmentStrings( "%COMPUTERNAME%" )'WScript.Echo "Computer Name: " & strComputerName'create the text fileSet objFSO = CreateObject("Scripting.FileSystemObject")Set objLogFile = objFSO.CreateTextFile("c:\inventory.csv", _ ForWriting, True)'read the wmi variables for manufacturer, serial and bios versionstrComputer = "."Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS",,48)For Each objItem in colItems 'Wscript.Echo "Manufacturer: " & objItem.Manufacturer 'Wscript.Echo "SerialNumber: " & objItem.SerialNumber 'Wscript.Echo "BIOS version: " & objItem.SMBIOSBIOSVersion strmanufacturer = trim (objItem.Manufacturer) strserial = trim (objItem.SerialNumber) strbiosver = trim (objItem.SMBIOSBIOSVersion)next'read the wmi variables for manufacturer, product id and modelSet objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")Set colItems = objWMIService.ExecQuery("select * from Win32_ComputerSystem",,48)For Each objItem in colItems strOEMStringArray = Join(objItem.OEMStringArray, ",") strOEMStringArray = trim (strOEMStringArray) 'WScript.Echo "OEMStringArray: " & strOEMStringArray 'wscript.Echo "model: " & objItem.Model strmodel = objItem.Model 'wscript.echo strmodel strprodid = trim (strOEMStringArray)NextobjLogFile.Write strComputerName & ","objLogFile.Write strmanufacturer & ","objLogFile.Write strmodel & ","objLogFile.Write strserial & ","objLogFile.Write strOEMStringArray & ","objLogFile.Write strbiosverobjLogFile.Close

Wmic Bios Get Serial Number Vb Script Mid

I found a VB script for that, and a similar VBS script.I adapted the first with the code I found in the second, I give them here, but on my computer, they return empty strings. Perhaps that's SP2 of XP or something like that.Try them and tell me if it works for you. Of course, you must have WSH installed (always in XP?) and to put them in a .vbs file.strComputer = "."Set objWMIService = GetObject("winmgmts:" & _"impersonationLevel=impersonate!\" & _strComputer & "\root\cimv2")Set colBaseBoard = objWMIService.ExecQuery _("Select * from Win32_SystemEnclosure")For Each objBaseBoard in colBaseBoardWscript.Echo "Part Number: " & objBaseBoard.PartNumberWscript.Echo "Serial Number: " & _objBaseBoard.SerialNumberWscript.Echo "Asset Tag: " & _objBaseBoard.SMBIOSAssetTagNext' ORstrComputer = "."Set objWMIService = GetObject("winmgmts:" & _"impersonationLevel=impersonate!\" & _strComputer & "\root\cimv2")Set colBaseBoard = objWMIService.ExecQuery _("Select * from Win32_BaseBoard")For Each objBaseBoard in colBaseBoardWscript.Echo "Serial Number: " & objBaseBoard.SerialNumberNext[EDIT] Searched a bit, found Download details: WMI Code Creator v1.0 which shown me the above code was OK (actually, it has been probably generated by it!). But it allowed me also to quickly check other values.strComputer = "."Set objWMIService = GetObject("winmgmts:" & _"impersonationLevel=impersonate!\" & _strComputer & "\root\cimv2")Set colBaseBoard = objWMIService.ExecQuery _("Select * from Win32_BaseBoard")For Each objBaseBoard in colBaseBoardWscript.Echo "Serial Number: " & objBaseBoard.SerialNumberWscript.Echo "Manufacturer: " & objBaseBoard.ManufacturerWscript.Echo "Name: " & objBaseBoard.NameWscript.Echo "Product: " & objBaseBoard.ProductNextworks, except for the serial number. Some other settings are not available too.

Or you can install the free utility Belarc Advisor which gives you product keys for Windows, Office, and all other licensed packages as well as all your hardware specifics, model, and serial numbers.

I had no idea you could get the product key right out of Windows, like most people I used to have a drawer full of product licenses, registration numbers, product keys, license keys, serial numbers. This sure would have been useful back in my days of being a heavy Windows 98, NT, 2000, and XP user! But if it works in Windows 10, Window 7, then I am not sure it would work in Windows XP, despite XP still being widely used.

In the diagram below, a command in Powershell lists some values regarding the above two USB devices. Clearly, what we have been calling the serial number does not conflate with what the identification in Powershell calls a serial number.

I tried the setup on a different computer we will call Computer 2. As if by magic, GSmartControl now showed me all of the correct information including serial number. Well now I have even bigger problems. Why would it work properly on Computer 2 but not Computer 1? What does the computer have to do with it?

JHUHUGIT obtains a build identifier as well as victim hard drive information from Windows registry key HKLM\SYSTEM\CurrentControlSet\Services\Disk\Enum. Another JHUHUGIT variant gathers the victim storage volume serial number and the storage device name.[173][174]

OSX_OCEANLOTUS.D collects processor information, memory information, computer name, hardware UUID, serial number, and operating system version. OSX_OCEANLOTUS.D has used the ioreg command to gather some of this information.[261][262][3]

Reaver collects system information from the victim, including CPU speed, computer name, volume serial number, ANSI code page, OEM code page identifier for the OS, Microsoft Windows version, and memory information.[292]

A batch file is a script file that stores commands to be executed in a serial order. It helps automate routine tasks without requiring user input or intervention. Some common applications of batch files include loading programs, running multiple processes or performing repetitive actions in a sequence in the system.


Welcome to the group! You can connect with other members, ge...


bottom of page