If you need a unique ID, you must first decide what do you mean with unique. If you like to use it for a copy protection mechanism than take something simple, cause if someone wants to use your software he can break your protection. In case of a unique hardware id, just think about VMware and you'll see you can spoof anything or someone can start to tamper your software.
So there is not much you can take from a pc as uniqueness over it's whole lifetime. If you need something like that you should start a search for a USB Dongle which you can send to your customers.
If you just need some less harder uniqueness you could take the MAC address, the OS serial number or the domain and username, but all of them are forgeable. But if your main goal is to lock out people you won't sell anything because no one wants to use your software because it is so hard to install or to move from one pc to another (this will happen quite often).
So in a first step, make it easy, take something simple which is not as easy to spoof in your target group (e.g. domain and usernames can't be good spoofed by enterprise customers, cause their pcs are running in a bigger environment with policies, etc.) and just forget about the others.
Maybe you can lock them out but that doesn't mean they're going to buy your software, they just don't use it anymore. But how many potential customers are not willing to pay cause you made it so complicated to use your program?