Registry key for security

  • Thread starter Thread starter ANSWER
  • Start date Start date
A

ANSWER

Hi,

I want to make registry key which I am going to install on each computer who
will have access to my database (made in MS Access) so I could
secure my database from un authorised access.
Can you help me to do that.
Thanks
 
the 2 functions that you need are SaveSetting and GetSetting,

Dim strValue As String
SaveSetting "yourAppName", "Settings", "YourRegKey", "YourValue"
strValue = GetSetting("yourAppName", "Settings", "YourRegKey",
"Default")

should do the trick.....
 
Be aware that SaveSetting and GetSetting (as suggested by Alex) use the
registry branch "HCU\Software\VB and VBA Program Settings". That's no
good if you want something like "HLM\Software\My Company\My Product",
as many people would.

Also, be aware that registry activity is easily detected & logged using
various tools, eg. SysInternals RegMon. So, a savvy user will instantly
see what you read from & write to the registry. Perhaps encrypt those
values, so the user can see them, but not undersytand them?

HTH,
TC
 
Yes you are totally correct, the interesting thing here is this, if someone
is smart enough to use SysInternals RegMon it does not matter where you put
the keys, encrypting the values is the only way, with some form of computer
name checking then encrypting that info and checking it everytime you run
the program.
 
It's the old tradeoff: 1% of effort will deter 99% of hackers, but /no/
amount of extra effort will defeat the other 1%.

We could probably all go back to using hidden files in the root
directory, without much loss :-)

Cheers,
TC
 
Back
Top