Like @InfuseDreams mentioned above, there are 3rd party commercial tools to help you with this. Several actually…
https://www.google.com/?gws_rd=ssl#q=win32+copy+protection
Or you can develop your own. Because if you use a 3rd party tool, then that’s a single target for hackers to target. Versus if you create your own scheme, nobody will know how it works until they dig into. It’s of course impossible to make it completely hacker proof, but it just has to be reasonable difficult.
An alternative solution is to make 2 different versions/builds of your app. I’m thinking of the shareware approach used back in the 90’s. 1 is a gimped trial version that people can use freely without expiration. The other version is the full/paid version that requires authorization over the Internet on startup. This might be a simpler approach, provided that it makes sense to make a trial version of your app that does not provide all of its features. For game it makes sense because you would only provide maybe the first few levels in the trial version.
And like I said in an earlier post above, you can fetch the Windows’ SID (Security Identifier) via system.getInfo(“deviceID”) to authorize the machine with.