I'm creating a program that authenticates from a before it runs. I also want to deny access. Is there an id or a serial that all windows computers have that cant be changed that I could put on a black list? and how would I access that in c#?
Hmm off the top of my head MAC address would be a good choice. It could be changed by getting a new NIC card, but its not super easy to change
MAC address can actually be changed quite easily.
This article: has info on exactly waht you want: http://www.codeproject.com/KB/system/GetHardwareInformation.aspx
basically, just mix a few of the hardware component IDs, and you should have a pretty solid key for your system.
A combination of CUPID,Hard disk Volumn ID and MAC address would be a good choice. They won't be changed unless with hardware changes. (However, HD vol ID would be changed you format the disk).
This kind of restriction on access is generally accomplished by a hardware dongle or by a licensing server. Without these, specifically identifying a particular PC as the 'allowed machine' is a tricky proposition and anything you choose is likely to be spoofable.
I think going to use the MAC address. I goggled it and cant get any of the examples, such as (link) to work. For some reason "ManagementClass" is not in the namespace "System.Management". I am running visualStudio2008, is this code outdated or is there something wrong with my installation?