Basically speaking, you can't. There are ways which can help, but all of them can probably be defeated.
Think about it: if you install your app in a sandbox, it doesn't matter what you do locally, it will be thrown away when I close the sandbox so the next time I want it, open the sandbox, install, and it's as if it was never done before. Same thing with VM's, and backups of my system just before I install.
There are things you can do: email registration is probably the simplest and most effective against "casual" theft, online validation of the hardware will protect to an extent against some more informed theft.
But to be honest, unless you are going to be selling loads of copies, it really isn't worth your investing much time in going too far - your time is expensive, so if you spend 100 hours getting it working and you sell 5 units at $30 a time, you've probably just lost a lot of money.
But having said that, have a look here: Creating Secure Trial Versions for .NET Applications - A Tutorial
Just remember that nothing is unbreakable: Adobe put a lot of manhours into securing each release of Photoshop, and the same day as it's released you can find cracked versions if you look carefully ... it's a challenge for some and they enjoy it!