Hi.
i want to make a trial version of my inventory application on the basis of total executions e.g i want to make my trial application to only execute 5 times and than show a message of application expiry.
how to do that.
thx in advance.
mansoor
Loading
Javeed M ShaikhPosted Oct 17, 2011, 9:27 AM
You can create registry keys and play with registry using Microsoft.Win32.RegistryKey, following is a simple example:
Microsoft.Win32.RegistryKey key;
key = Microsoft.Win32.Registry.CurrentUser.CreateSubKey("Counter");
key.SetValue("Counter", "1");
key.Close();
Also keep in mind that you need to encrypt your information before storing in the registry so that no one goes and reset the numbers. You can store this information in a file on your system maintain the same. No matter what you do if user comes to know about this information they will try to play with the data and hack your system. One more way to do this is call a web service from your app to maintain the user app counter, but again connecting to internet just for this might not be ideal.
Please do not forget to mark "Accepted Answer".
mansoor altafPosted Oct 17, 2011, 6:55 AM
raghavendra settyPosted Oct 17, 2011, 5:41 AM