9 2254
Machine serial Number
post your query in detail with
front-end, back-end versions.
explain your prolem then post what you had tryed.
post your query in detail with
front-end, back-end versions.
explain your prolem then post what you had tryed.
i want to protect my application without using any dongle. so i have to to get the hardware id. but hardware id like hdd id will change after format. cpu id also can change in BIOS. the best way is to get the get the serial number? how to get the manufacturer serial number?
thanks
i want to protect my application without using any dongle. so i have to to get the hardware id. but hardware id like hdd id will change after format. cpu id also can change in BIOS. the best way is to get the get the serial number? how to get the manufacturer serial number?
I don't think you can get it reliably. There was such a public outcry that Intel went back to switching it off by default. Nobody wants to have their PC tracked.
P.S. This sounds like a question for the Miscellaneous Questions or Software Development forum, as it really goes beyond a particular programming language.
I don't think you can get it reliably. There was such a public outcry that Intel went back to switching it off by default. Nobody wants to have their PC tracked.
P.S. This sounds like a question for the Miscellaneous Questions or Software Development forum, as it really goes beyond a particular programming language.
i also looking for how to get the hard disk serial number. unfortunately to say that, i couldnt get it. only can get the volumn number. but... if you really need and willing to pay for the solution, you can visit ionwork.com. its about 50USD.
however, hopefully someone can write the program to get the serial number and share with us.
Hi,
One of best way to configure a tool to run only on a particular machine is using the MANUFACTURER SERIAL NUMBER OF THE HARD DISK, which is UNIQUE.
GetVolumeInform ation will return ONLY the volume serial number, which keeps changing on format.
Use the following code to retrieve Model Number, Serial Number and Firmware Revision of a hard disk.
Here by I am providing the Class file code & vb file code.
I am pasting the code of the class file opened by notepad here by
--------------------------------------------------------------- -
VERSION 1.0 CLASS
-
BEGIN
-
MultiUse = -1 'True
-
Persistable = 0 'NotPersistable
-
DataBindingBehavior = 0 'vbNone
-
DataSourceBehavior = 0 'vbNone
-
MTSTransactionMode = 0 'NotAnMTSObject
-
END
-
Attribute VB_Name = "HDSN"
-
Attribute VB_GlobalNameSpace = False
-
Attribute VB_Creatable = True
-
Attribute VB_PredeclaredId = False
-
Attribute VB_Exposed = False
-
Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes"
-
Attribute VB_Ext_KEY = "Top_Level" ,"Yes"
-
Option Explicit
-
-
' Antonio Giuliana, 2001-2003
-
-
' Costanti per l'individuazione della versione di OS
-
Private Const VER_PLATFORM_WIN32S = 0
-
Private Const VER_PLATFORM_WIN32_WINDOWS = 1
-
Private Const VER_PLATFORM_WIN32_NT = 2
-
-
' Costanti per la comunicazione con il driver IDE
-
Private Const DFP_RECEIVE_DRIVE_DATA = &H7C088
-
-
' Costanti per la CreateFile
-
Private Const FILE_SHARE_READ = &H1
-
Private Const FILE_SHARE_WRITE = &H2
-
Private Const GENERIC_READ = &H80000000
-
Private Const GENERIC_WRITE = &H40000000
-
Private Const OPEN_EXISTING = 3
-
Private Const CREATE_NEW = 1
-
-
' Enumerazione dei comandi per la CmnGetHDData
-
Private Enum HDINFO
-
HD_MODEL_NUMBER
-
HD_SERIAL_NUMBER
-
HD_FIRMWARE_REVISION
-
End Enum
-
-
' Struttura per l'individuazione della versione di OS
-
Private Type OSVERSIONINFO
-
dwOSVersionInfoSize As Long
-
dwMajorVersion As Long
-
dwMinorVersion As Long
-
dwBuildNumber As Long
-
dwPlatformId As Long
-
szCSDVersion As String * 128
-
End Type
-
-
' Struttura per il campo irDriveRegs della struttura SENDCMDINPARAMS
-
Private Type IDEREGS
-
bFeaturesReg As Byte
-
bSectorCountReg As Byte
-
bSectorNumberReg As Byte
-
bCylLowReg As Byte
-
bCylHighReg As Byte
-
bDriveHeadReg As Byte
-
bCommandReg As Byte
-
bReserved As Byte
-
End Type
-
-
' Struttura per l'I/O dei comandi al driver IDE
-
Private Type SENDCMDINPARAMS
-
cBufferSize As Long
-
irDriveRegs As IDEREGS
-
bDriveNumber As Byte
-
bReserved(1 To 3) As Byte
-
dwReserved(1 To 4) As Long
-
End Type
-
-
' Struttura per il campo DStatus della struttura SENDCMDOUTPARAMS
-
Private Type DRIVERSTATUS
-
bDriveError As Byte
-
bIDEStatus As Byte
-
bReserved(1 To 2) As Byte
-
dwReserved(1 To 2) As Long
-
End Type
-
-
' Struttura per l'I/O dei comandi al driver IDE
-
Private Type SENDCMDOUTPARAMS
-
cBufferSize As Long
-
DStatus As DRIVERSTATUS ' ovvero DriverStatus
-
bBuffer(1 To 512) As Byte
-
End Type
-
-
' Per ottenere la versione del SO
-
Private Declare Function GetVersionEx _
-
Lib "kernel32" Alias "GetVersionExA" _
-
(lpVersionInformation As OSVERSIONINFO) As Long
-
-
' Per ottenere un handle al device IDE
-
Private Declare Function CreateFile _
-
Lib "kernel32" Alias "CreateFileA" _
-
(ByVal lpFileName As String, _
-
ByVal dwDesiredAccess As Long, _
-
ByVal dwShareMode As Long, _
-
ByVal lpSecurityAttributes As Long, _
-
ByVal dwCreationDisposition As Long, _
-
ByVal dwFlagsAndAttributes As Long, _
-
ByVal hTemplateFile As Long) As Long
-
-
' Per chiudere l'handle del device IDE
-
Private Declare Function CloseHandle _
-
Lib "kernel32" _
-
(ByVal hObject As Long) As Long
-
-
' Per comunicare con il driver IDE
-
Private Declare Function DeviceIoControl _
-
Lib "kernel32" _
-
(ByVal hDevice As Long, _
-
ByVal dwIoControlCode As Long, _
-
lpInBuffer As Any, _
-
ByVal nInBufferSize As Long, _
-
lpOutBuffer As Any, _
-
ByVal nOutBufferSize As Long, _
-
lpBytesReturned As Long, _
-
ByVal lpOverlapped As Long) As Long
-
-
' Per azzerare buffer di scambio dati
-
Private Declare Sub ZeroMemory _
-
Lib "kernel32" Alias "RtlZeroMemory" _
-
(dest As Any, _
-
ByVal numBytes As Long)
-
-
' Per copiare porzioni di memoria
-
Private Declare Sub CopyMemory _
-
Lib "kernel32" Alias "RtlMoveMemory" _
-
(Destination As Any, _
-
Source As Any, _
-
ByVal Length As Long)
-
-
Private Declare Function GetLastError _
-
Lib "kernel32" () As Long
-
-
Private mvarCurrentDrive As Byte ' Drive corrente
-
Private mvarPlatform As String ' Piattaforma usata
-
-
Public Property Get Copyright() As String
-
-
' Copyright
-
Copyright = "HDSN Vrs. 1.00, (C) Antonio Giuliana, 2001-2003"
-
-
End Property
-
-
' Metodo GetModelNumber
-
Public Function GetModelNumber() As String
-
-
' Ottiene il ModelNumber
-
GetModelNumber = CmnGetHDData(HD_MODEL_NUMBER)
-
-
End Function
-
-
' Metodo GetSerialNumber
-
Public Function GetSerialNumber() As String
-
-
' Ottiene il SerialNumber
-
GetSerialNumber = CmnGetHDData(HD_SERIAL_NUMBER)
-
-
End Function
-
-
' Metodo GetFirmwareRevision
-
Public Function GetFirmwareRevision() As String
-
-
' Ottiene la FirmwareRevision
-
GetFirmwareRevision = CmnGetHDData(HD_FIRMWARE_REVISION)
-
-
End Function
-
-
' Proprieta' CurrentDrive
-
Public Property Let CurrentDrive(ByVal vData As Byte)
-
-
' Controllo numero di drive fisico IDE
-
If vData < 0 Or vData > 3 Then
-
Err.Raise 10000, , "Illegal drive number" ' IDE drive 0..3
-
End If
-
-
' Nuovo drive da considerare
-
mvarCurrentDrive = vData
-
-
End Property
-
-
' Proprieta' CurrentDrive
-
Public Property Get CurrentDrive() As Byte
-
-
' Restituisce drive fisico corrente (IDE 0..3)
-
CurrentDrive = mvarCurrentDrive
-
-
End Property
-
-
' Proprieta' Platform
-
Public Property Get Platform() As String
-
-
' Restituisce tipo OS
-
Platform = mvarPlatform
-
-
End Property
-
-
Private Sub Class_Initialize()
-
-
' Individuazione del tipo di OS
-
Dim OS As OSVERSIONINFO
-
-
OS.dwOSVersionInfoSize = Len(OS)
-
Call GetVersionEx(OS)
-
mvarPlatform = "Unk"
-
Select Case OS.dwPlatformId
-
Case Is = VER_PLATFORM_WIN32S
-
mvarPlatform = "32S" ' Win32S
-
Case Is = VER_PLATFORM_WIN32_WINDOWS
-
If OS.dwMinorVersion = 0 Then
-
mvarPlatform = "W95" ' Win 95
-
Else
-
mvarPlatform = "W98" ' Win 98
-
End If
-
Case Is = VER_PLATFORM_WIN32_NT
-
mvarPlatform = "WNT" ' Win NT/2000
-
End Select
-
-
End Sub
-
-
Private Function CmnGetHDData(hdi As HDINFO) As String
-
-
' Rilevazione proprieta' IDE
-
-
Dim bin As SENDCMDINPARAMS
-
Dim bout As SENDCMDOUTPARAMS
-
Dim hdh As Long
-
Dim br As Long
-
Dim ix As Long
-
Dim hddfr As Long
-
Dim hddln As Long
-
Dim s As String
-
-
Select Case hdi ' Selezione tipo caratteristica richiesta
-
Case HD_MODEL_NUMBER
-
hddfr = 55 ' Posizione nel buffer del ModelNumber
-
hddln = 40 ' Lunghezza nel buffer del ModelNumber
-
Case HD_SERIAL_NUMBER
-
hddfr = 21 ' Posizione nel buffer del SerialNumber
-
hddln = 20 ' Lunghezza nel buffer del SerialNumber
-
Case HD_FIRMWARE_REVISION
-
hddfr = 47 ' Posizione nel buffer del FirmwareRevision
-
hddln = 8 ' Lunghezza nel buffer del FirmwareRevision
-
Case Else
-
Err.Raise 10001, "Illegal HD Data type" ' Altre informazioni non disponibili
-
-
(Evoluzione futura)
-
End Select
-
-
Select Case mvarPlatform
-
Case "WNT"
-
' Per Win NT/2000 apertura handle al drive fisico
-
hdh = CreateFile("\\.\PhysicalDrive" & mvarCurrentDrive, _
-
GENERIC_READ + GENERIC_WRITE, FILE_SHARE_READ + FILE_SHARE_WRITE, _
-
0, OPEN_EXISTING, 0, 0)
-
Case "W95", "W98"
-
' Per Win 9X apertura handle al driver SMART
-
' (in \WINDOWS\SYSTEM da spostare in \WINDOWS\SYSTEM\IOSUBSYS)
-
' che comunica con il driver IDE
-
hdh = CreateFile("\\.\Smartvsd", _
-
0, 0, 0, CREATE_NEW, 0, 0)
-
Case Else
-
' Piattaforma non supportata (Win32S)
-
Err.Raise 10002, , "Illegal platform (only WNT, W98 or W95)" ' Altre piattaforme
-
-
non gestite
-
End Select
-
' Controllo validità handle
-
If hdh = 0 Then
-
Err.Raise 10003, , "Error on CreateFile"
-
End If
-
-
' Azzeramento strutture per l'I/O da driver
-
ZeroMemory bin, Len(bin)
-
ZeroMemory bout, Len(bout)
-
-
' Preparazione parametri struttura di richiesta al driver
-
With bin
-
.bDriveNumber = mvarCurrentDrive
-
.cBufferSize = 512
-
With .irDriveRegs
-
If (mvarCurrentDrive And 1) Then
-
.bDriveHeadReg = &HB0
-
Else
-
.bDriveHeadReg = &HA0
-
End If
-
.bCommandReg = &HEC
-
.bSectorCountReg = 1
-
.bSectorNumberReg = 1
-
End With
-
End With
-
-
' Richiesta al driver
-
DeviceIoControl hdh, DFP_RECEIVE_DRIVE_DATA, _
-
bin, Len(bin), bout, Len(bout), br, 0
-
-
' Formazione stringa di risposta
-
' da buffer di uscita
-
' L'ordine dei byte e' invertito
-
s = ""
-
For ix = hddfr To hddfr + hddln - 1 Step 2
-
If bout.bBuffer(ix + 1) = 0 Then Exit For
-
s = s & Chr(bout.bBuffer(ix + 1))
-
If bout.bBuffer(ix) = 0 Then Exit For
-
s = s & Chr(bout.bBuffer(ix))
-
Next ix
-
-
' Chiusura handle
-
CloseHandle hdh
-
-
' Restituzione informazione richiesta
-
CmnGetHDData = Trim(s)
-
-
End Function
In the form, place a combobox with values 0,1,2,3 represents Primary Master, Primary Slave,
Secondary Master & Secondary Slave HDDs.
Code is -
Dim h As HDSN
-
-
Private Sub cmdGo_Click()
-
-
Dim hT As Long
-
Dim uW() As Byte
-
Dim dW() As Byte
-
Dim pW() As Byte
-
-
Set h = New HDSN
-
-
With h
-
.CurrentDrive = Val(cbDrive.Text)
-
-
lstInfo.Clear
-
lstInfo.AddItem "Current drive: " & .CurrentDrive
-
lstInfo.AddItem ""
-
lstInfo.AddItem "Model number: " & .GetModelNumber
-
lstInfo.AddItem "Serial number: " & .GetSerialNumber
-
lstInfo.AddItem "Firmware Revision: " & .GetFirmwareRevision
-
lstInfo.AddItem ""
-
lstInfo.AddItem "Copyright: " & .Copyright
-
End With
-
-
Set h = Nothing
-
-
End Sub
-
-
Private Sub Form_Load()
-
cbDrive.ListIndex = 0
-
End Sub
--------------------------------------------------------------------
Hope this will help you...
Thanks
Raj
One of best way to configure a tool to run only on a particular machine is using the MANUFACTURER SERIAL NUMBER OF THE HARD DISK, which is UNIQUE. ...
Perhaps so. But don't forget to allow for cases where a HDD is replaced. They don't last forever. That's one of the things that makes "activation " such a pain.
Perhaps so. But don't forget to allow for cases where a HDD is replaced. They don't last forever. That's one of the things that makes "activation " such a pain.
Hi,
Yes, that's the ONLY problem where client can cheat us!
Do you have any !dea to overcome this?
Raj
Do you have any !dea to overcome this?
Yes. Don't bother with the whole copy-protection farce. It just increases your development costs without any real benefit to anybody.
Hi.
I am also searching for the same concept. Do you know any means? Please send, very urgent.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Gavin |
last post by:
Hi, I'm a newbie to programming of any kind. I have posted this to other
groups in a hope to get a response from anyone.
Can any one tell me how to make my VB program read the Bios serial number
(or would HDD be better, or both?) and put that info into VB prog so the
program won't work on another computer. My program uses an MSAccess table.
Much appreciated if you can help!
Thanks
|
by: ^CeFoS^ |
last post by:
Hi to everybody, due to I want to use the serial port of a server
machine through an applet allocated in html document.
> Then one application will run in the server machine and using
> the serial port. The other application that will be called in the html
> document that it'll allocate the frame with the user interfaz and
> it'll manage the events (applet).
>
> But I have any questions. I suppose the server application will be
> running...
|
by: |
last post by:
Hi,
Do memory sticks have serial numbers like harddrives? If so how can I get
this, I want to uniquely identify a memory stick (removable drive) for
authentication.
Thanks
|
by: Klaus Bonadt |
last post by:
In order to protect software from being copied without licence, I would like
to use something like a key, which fits only to the current system. The
serial number of the CPU or the current operating system would be
appropriate. However, I do not know how to retrieve the information.
Could you help?
Klaus
|
by: Nitin |
last post by:
Hello,
We are trying to figure out how to get a unique identifier for a machine.
Our application is a C# windows application that talks to our server via a
webservice. Every time our webservice is called, we want to verify that the
user has a valid license. For that we want to identify the user via his/her
machine. I tried using the following
searcher = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive");
| |
by: Joby |
last post by:
Dear All,
I am very new to web technologies. I am working on .NET compact
framework(Pocket PC application). I put my probleme in front of you. I
have a server, where i am hosting my web page. When the user click on
the download button:
1) i want to install .NET frame work and i want to run an exe in the
client machine. How is it possible with a single click i can download
one CAB file(.NET) and my EXE program.
|
by: JJ |
last post by:
Now I know this question has been asked many times, but I cannot seem to
find a good site which summarises the methods possible in vb .net.
I am after a way of producing a unique serial number for my app. The program
would produce a unique identifier for the computer, then I would psovide the
user with a serial number unique to their machine.
In other words I would like to check for things like:
i) Hard disk (not volume) serial number...
|
by: Nebojsa4 |
last post by:
Hi.
First, sorry on my weak English to all.
Qusetion:
How to read (in VB) Manufacturer serial number of Hard disk drive?
Not volume/serial number of C:, D:, etc. partitons.
For reading volume/serial number of hard disk C: etc, You can use Microsoft Scripting Runtime (in VB):
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |