Bryan Carbonnell
Bryan_Carbonnell at cbc.ca
Mon Jan 5 07:17:52 CST 2004
I would suspect that some MoBo's don't support reading the serial number from it. I can't get the S/N from my MoBo in my Dell desktop box either. Bryan Carbonnell bryan_carbonnell at cbc.ca >>> mastercafe at ctv.es 05-Jan-04 1:09:16 AM >>> 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 _______________________________________________ AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com