How can i do for not allow the user changing the system date.
Thanks;) :p :D ;) :p
Printable View
How can i do for not allow the user changing the system date.
Thanks;) :p :D ;) :p
I don't think you can.
Has it got something to do with an time-based license on software of yours or something?
I have searched and found nothing on this subject... If I find, I will post the information...
i will add recordsets with the system date but i dont want to allow the user change the system date.
Is this for an internal application you are developing? I track by entries to my system.
When user enters I write system date to a hidden file.
Say they go into system today 9/12/2002. Store this date.
User changes date to the past, check against the last stored date... Gotcha.
;)
Yes it could be, do you say writing the date into a txt file, and then recovery it????
If it is for Licensing and that is the avenue you want to go down then as James suggested that is the best way to go about it.
Assume you start from setup, then you should automatically save a pre-dated file somewhere with the application files, as this will act as an initialisation that you can compare against and prevent any system date tampering before the application is run.
Ensure you don't save the file somewhere obvious, or if you must then run the data through a cypher and ensure the file is needed to start the app along with a certain key hidden within the data.
You don't have to save the file as a text file either, infact, hide it further by assigning a dummy extension... remeber unless your app is for people with an intimate knowledge of computers (Insert your own 3inch floppy gag) then they will be fairly ignorant of the watsit thingymajigs. When the app is started firstly check the system date, if it is earlier than that already on the file delete the key (License) if it isn't then update the hidden date file.
That should sort it for you, simple, though not hack proof by any means.
i have a doubt how can i do to update the file if a day the program has not been execute????
You do make a good point that if the app is never executed the date won't be stored. But then again, if it's not run, how would you run the code to check and see if the date was changed?
It's a date stamp. You simply update it as and when the application is evoked and also run all the comparison/update routines.
If you're just providing software with an expiry date (i.e. evaluation) then it doesn't matter when or how many times they run the application.
Maybe if you actually detail what you hope to achieve we can better offer our advice.
www.vbcode.com
search there..... theres a 30 day license code.. it checks sys date etc stores an entry in reg.. then checks bk on it to see if it was changed!!!
i think thats along the lines of wat your looking for :)