|
security
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Restrict use of Access to one computerG'day everyone
Is it possible to restrict a MS database so it can only run on a particular computer &/or system? I want to stop people from copying the database onto another system and using it there. Thanks Logi Then you have to find some value that uniquely identifies a single PC.
Oops! No such value, sorry! People sometimes try: - the hard disk serial number: but they get this using the win32 GetVolumeSerialNumber API. That returns the *volume* serial number - a completely different thing. - the CPU serial number: gone, but not forgotten :-) - the windows product ID - you can get this from the registry (thru code); - BIOS details (date etc.) - also gettable from the registry; - etc. and/or combinations thereof. IOW there is no easy solution. HTH, TC TC schrieb:
Show quoteHide quote > Then you have to find some value that uniquely identifies a single PC. Hi there,> > Oops! No such value, sorry! > > People sometimes try: > > - the hard disk serial number: but they get this using the win32 > GetVolumeSerialNumber API. That returns the *volume* serial number - a > completely different thing. > > - the CPU serial number: gone, but not forgotten :-) > > - the windows product ID - you can get this from the registry (thru > code); > > - BIOS details (date etc.) - also gettable from the registry; > > - etc. and/or combinations thereof. > > IOW there is no easy solution. > > HTH, > TC I beg to differ a little: If your computer has a network card, this will contain the MAC address, which is supposed to be unique. The Windows GUID is supposed to be different on each machine as well. (AFAIK the network adapter's MAC address is used for its generation -if present, that is. If not, a random value is used..) You can read the Windows GUID by declaring a function GetCurrentHWProfile along with its return type and calling this: Private Const HW_PROFILE_GUIDLEN = 39 Private Const MAX_PROFILE_LEN = 80 Private Type HW_PROFILE_INFO dwDockInfo As Long szHwProfileGuid As String * HW_PROFILE_GUIDLEN szHwProfileName As String * MAX_PROFILE_LEN End Type Private Declare Function GetCurrentHWProfile Lib "advapi32.dll" Alias "GetCurrentHwProfileA" (ByRef HwProfileInfo As HW_PROFILE_INFO) As Long Function PBMAIN() Dim lHWProfile As HW_PROFILE_INFO Dim dummy As Long dummy = GetCurrentHWProfile(lHWProfile) MsgBox "GUID: " & lHWProfile.szHwProfileGuid Debug.Print "GUID: " & lHWProfile.szHwProfileGuid End Function Hope that helps, Joerg -- Joerg Glissmann - Guending - Germany remove PANTS to reply ;-) Not sure I can accept the MAC, cos not all PCs have a network card :-)
I didn't know about the Windows GUID. Thanks for that info, I'll look at it further. I know that in some corporate installations, the Windows /Product ID/ is identical on all PCs. Would the GUID be different? Cheers, TC TC wrote:
... > I didn't know about the Windows GUID. Thanks for that info, I'll look You're welcome.. ;-)> at it further. > I know that in some corporate installations, the Windows /Product ID/ Hmm.. quite frankly, I don't know. I strongly suspect that it _is_ > is identical on all PCs. Would the GUID be different? indeed different, but I have never tested it myself. > Cheers, Regards,> TC Joerg -- Joerg Glissmann - Guending - Germany remove PANTS to reply ;-) Um, Joerg, GetCurrentHwProfile retrieves a GUID for the current
hardware profile - not for the PC as a whole. There might be many hardware propfiles on the same PC. Therefore, GetCurrentHwProfile could return many GUIDs - not just one - on a single PC. I can't see any way to use that function to identify a single PC. If you just use the /current/ profile, the identification fails if the user selects a different profile. And if you try to use /all/ profiles - perhaps concatenating all those GUIDs - the method fails if the user adds a new profile, or deletes an existing one. Also not available on win9x, afaics :-( Cheers, TC TC schrieb:
Show quoteHide quote > Um, Joerg, GetCurrentHwProfile retrieves a GUID for the current Hi TC,> hardware profile - not for the PC as a whole. There might be many > hardware propfiles on the same PC. Therefore, GetCurrentHwProfile could > return many GUIDs - not just one - on a single PC. > > I can't see any way to use that function to identify a single PC. If > you just use the /current/ profile, the identification fails if the > user selects a different profile. And if you try to use /all/ profiles > - perhaps concatenating all those GUIDs - the method fails if the user > adds a new profile, or deletes an existing one. > > Also not available on win9x, afaics :-( > > Cheers, > TC > thanks.. learned something again. That's the problem about programming for computer-abecedarians.. You don't have to care about most of the things you can do with your computer, because they won't do that anyway.. But woe betide you if someone should use something you haven't foreseen.. :-/ Joerg -- Joerg Glissmann - Guending - Germany remove PANTS to reply ;-) May be simple computer name would do the trick
google found this http://www.access-programmers.co.uk/forums/showthread.php?t=62146 Show quoteHide quote "Logi Bakels" <LogiBak***@discussions.microsoft.com> wrote in message news:03C8A379-E2C2-4787-973E-6B17A36F2C78@microsoft.com... > G'day everyone > > Is it possible to restrict a MS database so it can only run on a particular > computer &/or system? > I want to stop people from copying the database onto another system and > using it there. > > Thanks > > Logi I doubt you'll have much joy in using the computer name. That is not a
unique value. If you want a single value, you'd be better off using the windows product ID, or perhaps the windows GUID which Joerg has described. HTH, TC |
|||||||||||||||||||||||