Retrieving BIOS serial number and other System information

Questions or information that don't quite fit anywhere else

Moderator: Neosoft Support

Locked
User avatar
Rodrigo
Posts: 30
Joined: Wed May 30, 2012 6:23 am
Location: Chile

Retrieving BIOS serial number and other System information

Post by Rodrigo »

Hi everyone.

I share with you a simple way to get system information using "WMIC" (windows management instrumentation command-line).

Obviously, it is very likely that these tricks are known, but may serve to Someone.
Sorry my poor English :oops:

You just need to create a bat or cmd file with the appropriate lines.

The following example shows how to get the BIOS serial number.

1) Create a bat file (eg biossn.bat) and write the following lines:

Code: Select all

@echo off
wmic /Output:"C:\Dir\nsbios.dat" bios get serialnumber
type "C:\Dir\nsbios.dat" > "C:\Dir\nsbios.txt"
exit
Notes:
a) The path and file name in quotation marks may be others.
b) Because "wmic" writes the result file (nsbios.dat) using the UCS-2 Little Endian encoding, we could not read the file using NeoBook. Then simply use "Type" and ">" to read and then write using the UTF-8 encoding.

2) Now just simply use "RUN":

Code: Select all

Run "C:\Dir\nsbios.txt" "" "RunOnce+Wait+LoadComplete+Hidden" "" ""
The file "nsbios.txt" contain the BIOS serial number ready to read and use with NeoBook.

It is much more information that can be obtained in this way. And, not only get information, also take action. And all without plugins!. :lol:

If you know something I do not know about this information, add it to improve it. :roll:
Last edited by Rodrigo on Tue Jun 17, 2014 7:48 am, edited 1 time in total.
After the game, the nerd and the ignorant will return to the same box
User avatar
Wrangler
Posts: 1531
Joined: Thu Mar 31, 2005 11:40 pm
Location: USA
Contact:

Re: Retrieving BIOS serial number and other System informati

Post by Wrangler »

Good one, Rodrigo. Thanks!
Wrangler
--------------
"You never know about a woman. Whether she'll laugh, cry or go for a gun." - Louis L'Amour

Windows 7 Ultimate SP1 64bit
16GB Ram
Asus GTX 950 OC Strix
Software made with NeoBook
http://highdesertsoftware.com
User avatar
virger
Posts: 540
Joined: Mon Sep 18, 2006 12:21 pm
Location: Costa Rica, America Central

Re: Retrieving BIOS serial number and other System informati

Post by virger »

Muy interesante. Gracias
Recomiendo tambien este link:
http://www.windows-commandline.com/

PURA VIDA
COSTA RICA
EN EL MUNDIAL
COSTA RICA
PURA VIDA
User avatar
dpayer
Posts: 1394
Joined: Mon Apr 11, 2005 5:55 am
Location: Iowa - USA

Re: Retrieving BIOS serial number and other System informati

Post by dpayer »

virger wrote:Muy interesante. Gracias
Recomiendo tambien este link:
http://www.windows-commandline.com/

PURA VIDA
COSTA RICA
EN EL MUNDIAL

Also, one of the most useful command line 'helpers' is the CLIP command that will take the output that would normally write to screen and send it to the clipboard instead. This makes it very easy to search the results of a command line utility for the item you want.

See: http://blogs.msdn.com/b/oldnewthing/arc ... 19908.aspx

David P.
David Payer
Des Moines, Iowa
USA
ajhunt
Posts: 266
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom
Contact:

Re: Retrieving BIOS serial number and other System informati

Post by ajhunt »

Hi all, does anyone know if this will work on all Windows versions from 7 to 10? - would be a great way for protecting publications and locking to a particulay system. Many thanks for the information. :)

I also came across the following Function below, would this also work on all Windows versions from 7 - 10?

{NeoBook Function}
Version=5.80
Language=VBScript
{End}
dim strComputer
dim objWMIService
dim colBIOS
dim objBIOS

strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colBIOS = objWMIService.ExecQuery("Select * from Win32_BIOS")

For each objBIOS in colBIOS
publication.nbSetVar "BiosNumber", objBIOS.SerialNumber
Next
User avatar
virger
Posts: 540
Joined: Mon Sep 18, 2006 12:21 pm
Location: Costa Rica, America Central

Re: Retrieving BIOS serial number and other System informati

Post by virger »

Fantastico, super util, novedoso para mi. Muchas gracias.
Este link te llevara a encontrar muchas más utilidades dentro de "WMIC" y hasta un programa GRATIS para crear .bat , VBScript, y otros
--------------------------------------------------
Fantastic, super useful, novel for me. Thank you very much.
This link will take you to find many more utilities within "WMIC" and even a FREE program to create .bat, VBScript, and others

https://norfipc.com/comandos/informacio ... -wmic.html
COSTA RICA
PURA VIDA
ajhunt
Posts: 266
Joined: Sat Apr 23, 2005 2:33 pm
Location: United Kingdom
Contact:

Re: Retrieving BIOS serial number and other System informati

Post by ajhunt »

Nice link Virger, thanks for sharing :)
Locked