There are several ways to do this. One is to use procmon.exe to watch what is going on in the background to see what the program is doing. You would be looking for such instances as writing to the registry or specific files. Sometimes software companies will write a specific registry key or to a file which the trial software will read to see if it's time has expired. Another way is to use an installation program scanner, such as Comodo that watches the interaction the install has with the OS. The easiest way is to load a trial version into an Oracle VM. The reason for using Oracle is because it allows you to take snapshots of different times, instead of just being able to restore 1 step back.
The first thing is of course to install the OS. Next, take a snapshot after it is setup and configured, but before you install the trial version software. Now you can install the software. You can now revert back to the snapshot, which will erase everything that has taken place in the virtual environment since the snapshot was taken. Though this will work for the majority of trial software, it will not work on some that require online registration, at which point, they look for a new OS to register with. I am thinking they associate the SID with the registration. An option here is to load it on varying VMs.