Yes, with a program that watches what changes are made in the registry. But it must run during the installation of that trial program. And after the trial period is over you can undo those changes.
But a trial version of a program is meant to work for a limited time period only. If you want to keep it, buy it. If you won't buy it, then don't use it.