[AccessD] Mac address

MastercafeCTV mastercafe at ctv.es
Mon Jan 5 00:09:16 CST 2004


We check this function and can't obtain any serial from the mainboard.
The AXP check ok for compiling but return only " ," (two character)

Do you know why??

We use the serial HDD control to check the computer, and with this code

Set fs = CreateObject("Scripting.filesystemobject")
Set d = fs.getdrive(fs.getdrivename(fs.getabsolutepathname("C:")))
HDD = d.SerialNumber

The lenght can be 6 or more characters

Juan Menendez
Mastercafe

===========================================
MASTERCAFE SL - NIF B-82.617.614
www.mastercafe.com
Deleg. Asturias 
Tel 985.88.49.44 / 627.531.764
Fax 627.500.205
info at mastercafe.com
juan at mastercafe.com
Deleg. Madrid
Tel 627.474.285
cecilia at mastercafe.com
===========================================


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan
Sent: lunes, 05 de enero de 2004 1:40
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Mac address


On 4 Jan 2004 at 17:43, John Bartow wrote:

> I was just wondering why the Main Circuit Board Serial Number isn't 
> used for this. It would seem to me that this would be about the most 
> stable unique ID number in a PC. I have no idea how you would read 
> this number but it always shows up in my hardware asset inventories.
> 
> Any comments?

Public Function MBSerialNumber() As String

'RETRIEVES SERIAL NUMBER OF MOTHERBOARD
'IF THERE IS MORE THAN ONE MOTHERBOARD, THE SERIAL
'NUMBERS WILL BE DELIMITED BY COMMAS

'YOU MUST HAVE WMI INSTALLED AND A REFERENCE TO
'Microsoft WMI Scripting Library IS REQUIRED

Dim objs As Object

Dim obj As Object
Dim WMI As Object
Dim sAns As String


Set WMI = GetObject("WinMgmts:")
Set objs = WMI.InstancesOf("Win32_BaseBoard")
For Each obj In objs
  sAns = sAns & obj.SerialNumber
 If sAns < objs.Count Then sAns = sAns & ","
Next
MBSerialNumber = sAns
End Function
 
-- 
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System Support.



_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list