How do I get the motherboard's Serial Number?

 

If you have Windows 2000/XP, you can use Windows Management Instrumentation (WMI).

clear
local loloc, lowmi, locolboard, loboard, loproperty

loloc = createobject('WbemScripting.SWbemLocator')
lowmi = loloc.ConnectServer()

locolboard = lowmi.InstancesOf('Win32_Baseboard')
for each loboard in locolboard
    for each loproperty in loboard.Properties_
       if inlist(upper(loproperty.Name),'NAME', 'SERIALNUMBER', 'MANUFACTURER') then
          ? loproperty.Name, loproperty.Value
       endif
       loproperty = .NULL.
    endfor
    loboard = .NULL.
endfor

store .NULL. to lowmi, loloc

Thanks to Lary Miller for the contribution.