If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#13
|
|||
|
|||
"Michael Wittmann" wrote in message t...
Hi folks, I have to write a Visual Basic 6.0 Program and need to uniquely identify a computer in a network and the user mustn't be able to change that id while my program is running. So the Volume Serial Number of the HDD isn't a possibility, because you can set the Volume SN whatever you want and therefore it's not unique in a Network. I heard that there's a manufacturer's Serial Number on the HDD that can't be changed and that is unique (worldwide?). How can I get that SN with VB6? Or do you have any other ideas? Like a BIOS SN? Thanks a lot in advance, Michael PS: Answer in German is ok. Here's a way to get the BiosID: Look here for more info: http://msdn.microsoft.com/library/de...win32_bios.asp ----------------------------------------------------------- Private Declare Function GetComputerName Lib "kernel32" Alias "GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long Public Function GetBiosVersion() As String Dim strComputerName As String Dim objWMIService Dim colItems Dim objItem On Local Error Resume Next strComputerName = Space(255) GetComputerName strComputerName, 255 strComputerName = Left(strComputerName, InStr(1, strComputerName, Chr(0)) - 1) Set objWMIService = GetObject("winmgmts:\\" & strComputerName) Set colItems = objWMIService.ExecQuery("Select * from Win32_BIOS ", , 48) For Each objItem In colItems GetBiosVersion = objItem.SerialNumber Next End Function ----------------------------------------------------------------------- Reinier |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Modem and other on same serial, alternately? | Rick | General | 4 | October 25th 03 06:13 PM |
USB, Parallel Scanner, Serial Joystick | The Kid | General | 2 | September 1st 03 04:38 AM |
serial to parallel adapter | Old guy | General | 2 | July 30th 03 11:11 PM |
Adding ten or so serial ports? | Paul Hutchings | General | 4 | July 23rd 03 08:54 AM |
KVM Switch for Both PS/2 and AT Connectors | Alien Zord | General | 5 | July 9th 03 07:19 PM |