Source language: Translate to:

Extract MachinID

Questions related to the distribution, marketing and selling of applications created with NeoBook. (Formally titled: "Making Money with NeoBook")

Moderators: Neosoft Support, Wrangler

Postby Neosoft Support » Tue Aug 17, 2010 1:57 pm

The code I posted is for the entire function file. Copy it into Notepad and save it into your NeoBook Functions folder.

If pasting directly into NeoBook's function editor, use just this part:

Code: Select all
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 "[BIOSSerialNum]", objBIOS.SerialNumber
NeoSoft Support
Neosoft Support
NeoSoft Team
Posts: 5620
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby Thunder » Mon Aug 30, 2010 2:06 pm


Somebody would have some example in .pub


Posts: 22
Joined: Sat Apr 11, 2009 2:21 pm

Postby rishi » Sun Oct 10, 2010 4:33 pm

Hi all:

In my computer, in the variable [BIOSSerialNum], appears the expression "System Serial Number" as a result.

Somebody would be able to help me.


Posts: 71
Joined: Wed Oct 05, 2005 1:23 pm

Postby Tony Kroos » Sun Oct 10, 2010 4:54 pm

It is just impossible to get BIOS serial number on some systems. Also, it is impossible to get a motherboard s/n from some devices (s/n may be just printed out on board surface, and that's all :))) The same situation with HDD serial (real hardware s/n, not volume id). If you want to implement a reliable hw-check, use Processor identification:

Code: Select all
On Error Resume Next
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor")
For Each objItem in colItems
    NbSetVar "[CPU_Clock]", objItem.CurrentClockSpeed
    NbSetVar "[CPU_Name]", objItem.Name
    NbSetVar "[CPU_ID]", objItem.ProcessorId

Copy this to Neobook function editor as VBScript, save and call. Processor ID will be returned to [CPU_ID] variable. Btw, you may want to detect processor name and clock speed for other needs, here you are - look into [CPU_Name] and [CPU_Clock] variables.
Tony Kroos
Posts: 405
Joined: Thu Oct 15, 2009 3:43 pm


Return to Distributing, Marketing and Selling NeoBook Applications

Who is online

Users browsing this forum: No registered users and 1 guest