The problem with producing any type of file, no matter if its compiled and branded on the fly or branded and delivered in some fashion either by download or on a CD ROM in the mail; the problem is that once its in someone elses hands there is not much you can do to control how its further distributed and changed (hacked - cracked - reverse engineered -whatever...).
Thats kinda why I like my idea the best

at least if you no longer control the 'further distribution' at least you control the functionality. Yeah, it would probably drive a legit customer nuts (it would drive me nuts too).
Wev'e all at one time or another possibly violated a EULA, or 'accidently' pirated a product by letting a good friend install it, we have all sinned

.
Anyway, how about this....uniquely brand each copy of the product on the fly at compile time (like already suggested) but have some self modifying code built in that calculates and embeds the computer GUID in the installed product after installtion. Then have the user activate the product on line before it will function (just like MS does for winXP). After its activated the unique brand is now tied to a specific computer GUID, the software operates, gets updates, etc....and no further connection to the net needed (unless you re-installed it and needed to re-activate it). You wouldn't need to carry out any further checking or activation, just that one time activation. Then if that unique brand shows up again and tries to activate again, refuse activation until the user proves he/she is the one that purchased the product. For activation also have the purchaser supply a unique code that is supplied by you to them at time of purchase. This way at least once the product has been activated once, that particular file will never work again for anyone else even if the uniqe code is passed around because its tied to a particular computer. This may not stop someone from cracking or redistributing your product completly but it would surely limit it.
Besides, even if you did track down someone who pirated your product, unless you caught them in the actual act of using the product, d/l or distributing the product, etc...in other words they would have to be caught setting in front of the computer actually doing the act at the moment you caught them; unless these things happen you can scream and yell all you want and the law is not going to really prevail in your favor. If it was eaisier then that then all the people in the world who ever pirated a piece of software would be in prison today. Why do you think it was so hard to shut down Napster a few years back - because they had to prove beyond a shadow of a doubt that the Napster folks knew what was going on, they eventually prevailed not by law but by driving Napster into bankruptcy just about.