Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check the hardware specification??

Status
Not open for further replies.

Fekri

Programmer
Jan 3, 2004
284
IR
Dear All,

I want to make some security for my databse on the computer which I installed my project.

Is there any way to look for any hardware specification in access??

For example during installation I will give the Hard Disk serial number to one table and on each opening the database,
Automatically check this serial number, if it's not same don't open it!!

Also, If any suggestion for more security idea will be appreciated.

Thanks
Ali Fekri

 
A starting point:
Code:
Sub ListDrives()
   Dim fso, dc, d
   Dim s As String, n As String
   Set fso = CreateObject("Scripting.FileSystemObject")
   Set dc = fso.Drives
   For Each d In dc
      n = ""
      s = s & d.DriveLetter & " - "
      If d.DriveType = Remote Then
         n = d.ShareName
      ElseIf d.IsReady Then
         n = d.VolumeName & " SN:" & Left(Hex(d.SerialNumber), 4) & "-" & Right(Hex(d.SerialNumber), 4)
      End If
      s = s & n & vbCrLf
   Next
   MsgBox s
End Sub

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks PH

I run it and works perfect But also can you tell me when I have this serial number, how to make code to check this serial number each time in start of program??

Because this code will give me the serial number during run this code but I want to put this serial number in my database to check by access every time when the program is running!!

Thanks
Ali fekri
 
Tweak this Sub to make a Function returning the serial number of the C: drive and have a look at the DLookUp function.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top