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.