Actually there is no fool proof way of doing this. There are tools available in the market that can be used to prevent piracy, but then nothing is 100% safe and secure.

You can use Hardware Locks, which are little bit expensive.