How do I create a trial version of 3 month for my application ?

I want to do it like Norton. If I uninstall the application and reinstall it, I don't want it to reset the trial.

How is it working ? Is it a hidden key in the registry or a DLL in system32 ?

The only thing I know is that I should not name it with a significative name.