How to create a demo version of my software in visual studio using an MSI?
How to create a 30 days evaluation software. Is there any possibility to do this with MSI creation. It would be great if MSI installe开发者_如何学编程r package provides such in built facility, by which, application expires after fixed trial period.
If we going for custom action to do this by writing code, how can i do this.
How to Write installation time in some file in installed path or in registry or both. Please give some sample of how to capture time during installation.
You can create a custom action that will be run on install. I suggest to go with visual basic. You can get the current date and write it in the registry:
Dim dtmTest As Date
dtmTest = DateValue(Now)
You'll find here some examples about writing data into registry. Every time your application starts you can check for the registry key, read it's value and inform the user about how much time it's left. Make sure that you'll check if the key already exists and don't write it's value again in order to avoid installing/uninstalling your trial version.
This should work ok, but there are certain programs that trace all that you're installer does and they'll be able to delete the registry key and reinstall the software. It would be safer to write the first install date into a database somewhere on a web server.
You can create a c++ custom action within a dll and run it at install. Here's an example about how to create the custom action and how to run it during the setup process.
精彩评论