views:

45

answers:

1

How to create a 30 days evaluation software. Is there any possibility to do this with MSI creation. It would be great if MSI installer 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.

+1  A: 

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.

Adrian Faciu
Thanks 4 ur reply.But i dont know visual basic.Any chance to get samples in c++. This is a great help 4 me...
How to create a custom action and how to make it run during install.
If for any reason the above example with the c++ custom action is not good, just google "MSI C++ Custom Action" and you'll find a lot of information and examples.
Adrian Faciu