I have developed an app. I want to protect this app, just like the one where we install some software by entering CD-key/Serial key.

But I m not understanding how to do it?

I want the serial key to be based on some formulation by MAC address!

My Case: I will give my app to a user.
Then, a form will display MAC Address(I got this part) and textbox - where user will enter the key after entering the correct key the app will work. The key must be different for different machine (since the mac will be different).
And suppose the user copy the installed files to another machine, the app shouldn't work!!

Please help me with this!!