Click here to Skip to main content
15,884,099 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello Everybody,

I want to create 1 application for date n time which increment date n time automatic(like system date n time) after system shut down n on start again.

My actual requirement is like this :

In my application , i want to restrict user to do entry in back date.
but actual what happen ,when user change system date ,entry will b possible.

so i think i have 2 create 1 app which work like system date n time,n i install that app on user's PC n then restrict them according to my app date n time.

So,can u please help me out

Thanking you in advance
Posted
Comments
Mahesh Bailwal 3-Sep-13 3:19am    
you can also use some web service for getting current date time.

http://www.peninsula.com/getlocaltime.asmx
Richard MacCutchan 3-Sep-13 3:53am    
You cannot prevent a user from running any application, nor from changing the system time.

you can't prevent user from doing this
 
Share this answer
 
If you have an application that works like the system datetime then I suspect you will expose that program to any changes the user might make to the system datetime!

However, here is a method that I once used to restrict use of a timebound demonstration program.

On program install I recorded somewhere (back then I used the registry) the date and time of installation. This was confirmed as being "reasonable" by comparing it to an encrypted date in the "licence" key that I had the user enter at installation.

That date was encrypted to look like anything but a datetime and was not "badged" with the program name ... in other words I tried to make it difficult to find.

At regular points in the runtime of my application it would check the system date and time against this stored datetime and (in my case) exit if the stored datetime was after the system datetime ... i.e. if the user had backdated their system clock. If the test passed then I would update the stored datetime with the datetime of the last check. I didn't just do this on program load to prevent the user from loading the program and then backdating their system clock.

The master date wasn't removed by the uninstall which meant I could also check to see if they were attempting to reinstall.

Obviously there are ways around this (as with most things) but if you don't advertise how you're doing the checks and hide the master date away carefully it should do what you need.
 
Share this answer
 
Comments
Urvi Rajyaguru 23-Sep-13 7:15am    
thank you very much.my problem got resolved.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900