Reading the Hard Drives Serial Number 
Author Message
 Reading the Hard Drives Serial Number

I am writing a shareware program in Access 97.  As usuall I need to lock
the program until it is registered.  I would like to read and store the
serial number of the boot drive on the initial load.  And then check it
everytime to see if it has been copied or legit.  

Does anybody know how to do this?

Or is there a better way of checking?
-------------------
Arthur Christy

Power Micro Corporation
http://www.*-*-*.com/



Fri, 02 Jun 2000 03:00:00 GMT  
 Reading the Hard Drives Serial Number

There are several commercial programs you can buy to get protection.  Best
method is a date-limitation method, I think, but none of them other than
hardware keys are foolproof.

Don't see much point in doing what you propose, since anyone can just take
the original installation package, install on another machine and start
from scratch.  And if you are trying to store the ID on the original disks,
the user can just copy them right off the bat before anything else, and use
the {*filter*} disks for the next install.  So it really isn't much protection.

Access security is still a great way to get protection, and it is free.
--
Pete B



Quote:
> I am writing a shareware program in Access 97.  As usuall I need to lock
> the program until it is registered.  I would like to read and store the
> serial number of the boot drive on the initial load.  And then check it
> everytime to see if it has been copied or legit.  

> Does anybody know how to do this?

> Or is there a better way of checking?
> -------------------
> Arthur Christy

> Power Micro Corporation
> http://www.*-*-*.com/



Sat, 03 Jun 2000 03:00:00 GMT  
 Reading the Hard Drives Serial Number

Try this

' ******************  Code Start  ********************
Private Declare Function GetVolumeInformation Lib "Kernel32" Alias _
    "GetVolumeInformationA" (ByVal lpRootPathName As String, _
    ByVal lpVolumeNameBuffer As String, ByVal nVolumeNameSize As Long, _
    lpVolumeSerialNumber As Long, lpMaximumComponentLength As Long, _
    lpFileSystemFlags As Long, ByVal lpFileSystemNameBuffer As String, _
    ByVal nFileSystemNameSize As Long) As Long

Function VolSerialNo(lpRootPathName As String) As String
  Dim lngRet As Long
  Dim lpVolumeNameBuffer As String
  Dim nVolumeNameSize As Long
  Dim lpVolumeSerialNumber As Long
  Dim lpMaximumComponentLength As Long
  Dim lpFileSystemFlags As Long
  Dim lpFileSystemNameBuffer As String
  Dim nFileSystemNameSize As Long

  lngRet = GetVolumeInformation(lpRootPathName, _
    lpVolumeNameBuffer, nVolumeNameSize, lpVolumeSerialNumber, _
    lpMaximumComponentLength, lpFileSystemFlags, _
    lpFileSystemNameBuffer, nFileSystemNameSize)
  If lngRet <> 0 Then
    lngRet = lpVolumeSerialNumber
  End If
'at this point you can either return lngRet (the Decimal representation,
'change the function Declaration to As Long)
'or keep this function as is to return the xxxx-xxxx representation you
'get with Vol or Dir

End Function
' ******************  Code Start  ********************

Call it with something like
    VolSerialNo("c:\")

Quote:

>I am writing a shareware program in Access 97.  As usuall I need to lock
>the program until it is registered.  I would like to read and store the
>serial number of the boot drive on the initial load.  And then check it
>everytime to see if it has been copied or legit.

>Does anybody know how to do this?

>Or is there a better way of checking?
>-------------------
>Arthur Christy

>Power Micro Corporation
>http://www.powermicrocorp.com



Sat, 03 Jun 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Reading the hard drive's serial number

2. Hard Drive Serial Number/Total Drive Size

3. hard drive serial number

4. Hard Drive Serial Number

5. Hard Drive Volume Serial Number

6. Hard drive serial number

7. Getting Hard Drive Serial number

8. How can I get the serial (or other) number of my hard drive through VB

9. How can I get the serial (or other) number of my hard drive through VB

10. API call for hard drive serial number

11. Hard Drive Serial Numbers

12. Hard Drive Serial Numbers

 

 
Powered by phpBB® Forum Software