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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Write to System Object table 2

Status
Not open for further replies.

jancheta

Programmer
Aug 30, 2002
51
US
Hi. I have a requirement that the software that I wrote in access 97 needs to be disabled say in 30 days.

Would you happen to know of a property that maybe useless which I can toggle and place perhaps a date?
For example:
dim dbs as object, sProp as string, sDate as string
sProp = "dbs property?"
sDate = "06/01/2003"
set dbs = Currentdb
dbs.Properties(sProp) = sDate

Or maybe a different solution?

Thanks in advance.

Jason

 
Sub ShowDbProps()
Dim CurProp As Property
For Each CurProp In CurrentDb.Properties
On Error Resume Next
Debug.Print CurProp.Name & " = " & CurProp.Value
Next CurProp
End Sub

Sub SetDbProp(Name As String, PropType As Integer, Value As Variant)
Dim NewProp As Property
Set NewProp = CurrentDb.CreateProperty(Name, PropType, Value)
CurrentDb.Properties.Append NewProp
End Sub

Sub TestDbProps()
ShowDbProps
SetDbProp "TodaysDate", dbDate, Date
ShowDbProps
End Sub
 
Hi beetee,

Cool! I'll try it out and advise (I wasn't sure that I would screw up the System Objects properties)

Thanks for the code!

Jason
 
It should be OK, I more-or-less pulled the example right out of the Access help.

Good luck!
 
Betee,

Thanks! Worked like a charm.

Regards,

Jason
 
Technically, I do not think htis is manipulating the "System Tables", but just the property set of the db itself.

Directly manipulating hte actual "System Tables" is a distinctly dangerous prposition. Do not do it (particularly if you have to ask for the advice on HOW to do it here (in a public forum).

While the 'soloution' provided by beetee certainly creates a property which you can freeely set to your desired value and use thereafter, it is not a very good choice for crippling your app after some period.

I would suggest that you do a search through these fora on various key words and review the postings for other approaches and relevant args for and aginst the details of various implementations.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Michael, you are right, setting a database property is not manipulating a system table.

Why do you think using a database property is a poor method, and what would you say is a better method?
 
Partly, the ability to hide / disgise the function would be (at least in my opinion) somewhat more difficult when contained completly within the application. Since one can generally bypass the startup process, an astute user can (will?) attempt to do so (and usually succede). Once the startup is bypassed, the (astute) use ned only to inspect the code instantiated therein and change to suit their purpose (e.g. change the 'expiration date, change the interval allowed, go to a label which simply sets the "O.K." flag ...).

While many other procedures are also amenable to "hacking", most "users" become somewhat wary of muckiing about in registry settings, which can be encrypted at the time of their generation, and thus become more or less unalterable, Combining this with some additional checks throught the code -at least for me- provides a mopre daunting task.



MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Of course using the registry is an option. One could also encrypt the database property value Jancheta proposes to use. I think an argument could be made that db property values are more arcane than registry values.

Unfortunately, I don't understand how adding a registry entry prevents people from bypassing the Access startup code. Could you explain further?
 
Hi Michael,

Thanks for you advise and concerns. Here's what I have:
DATABASE (access located on the server)
-add a new property "Exprire Date" and assign an encrypted value

CLIENT APP
-the code for my splash screen checks the links to the DATABASE located on the server and asks for user input if not connected, etc.
-modified the code to look up the database property "Expire Date" in the DATABASE, if the property doesn't exist, then someone did some hanky panky on it and the message "License Expired" appears and the program terminates. On validating the property where the value is encrypted, I checked it against the current date, if the current date is greater than the "Expire Date", then a prompt appears to enter a new license number, if valid, the "Expire Date" is modified.

Notes:
a. My client app is in .mde which as far as I know, it cannot be decrypted(?). As far as the access database on the server, I have no control over it and could be easily connected to by access or another application.
b. The client app is deployed on multiple desktops. Initially I was thinking of manipulating the registry however a drawback could be that on each computer, a license number would need to be entered. Then the user could just uninstall and re-install. I've encountered an app where their "expire date" is embedded in the registry somewhere but the design of the app was for single user.

Any thoughts/ideas are greatly appreciated.

Regards,

Jason
 
What Michael is pointing out is...
If your client app stills 'works' if the user bypasses the autoexec macro (or /x <macro_name> from a shortcut), by directly executing other macros or opening other forms, then you have a problem.

Of course, you can deal with that by sprinkling the date validation in other strategic (e.g. what makes your app valuable) locations.

Do you plan on having some means of renewing the license?
 
renewal and legal issues are also covered in other posts in these fora.

A part of the rationale in NOT including the expiration info in hte BE is the legal issue. As I understand the legaleese, you are in jeporday if you deny your client access to THEIR data. You are well within your rights in most cases to deny them access to YOUR propriteary 'code'. &quot;TrialWare&quot; should have clear and prominient notice of the nature of the application and the restrictions and limitations imposed.






MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Beetee,

For the coding that I do, I never use Macros, strictly VBA. I don't use the autoexec macro, instead I have the Display Form/Page property of the Startup (menu) set to my initial form (splash screen). Upon deployment, I manipulated the AllowBypass property to False which disables the shift key.

If the user finds a way to still open the client database, they will not be able to run any of the forms/reports since I have code that checks if the user has really logged in.

For the licensing, yes, they can renew the license.

Michael, I will review the license agreement of the software. Question: If/When the license is revoked, they will still have means to access their data but not through the proprietary code (say by hiring a consultant to analyze the backend database), is it still possibly that I could be in jeopardy?

Thanks again for your comments!

Regards,

Jason
 
jancheta,

I am NOT a lawyer (and I do not even pretend to like them or much of their professional arena). From MY understanding, you shoud be completly clear. On the other hand, you should -if you are actually &quot;in business&quot; have and use professional counsel who is knowledgeable in the specific area of software licensing. After all, Oracle, MS, and IBM all do this on a regular and HUGE business basis w/o much legal activity, 'all things great and small&quot; MUST be possible, it is just diffulct and you neeed to protect yourself.



MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Michael,

Thanks for your help!

Regards,

Jason
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top