Results 1 to 20 of 20

Thread: resolved - How uniquie is the cpu id ?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2005
    Location
    UK
    Posts
    127

    resolved - How uniquie is the cpu id ?

    how unique is this ? will i ever get duplicates ? and will it ever change ?

    ... i want some way of relating my software to the customer .... is there a system GUID?

    Code:
        Function GetCPUID() As String
            Dim sReturn As String = ""
            Try
                Dim objMOS As ManagementObjectSearcher
                Dim objMOC As Management.ManagementObjectCollection
                Dim objMO As Management.ManagementObject
    
                objMOS = New ManagementObjectSearcher("Select * From Win32_Processor")
                objMOC = objMOS.Get
                For Each objMO In objMOC
                    sReturn = objMO("ProcessorID")
                    Exit For
                Next
                objMOS = Nothing
                objMOC = Nothing
                objMO = Nothing
            Catch ex As Exception
                '# error getting cpu id
                myErr.WriteToErrorLog(ex.Message, Environment.StackTrace, "Error returning system ID.")
            End Try
            Return sReturn
        End Function
    Last edited by illskills; Mar 4th, 2010 at 10:33 PM.

  2. #2

    Re: How uniquie is the cpu id ?

    I believe each CPU has a different ID, but I could be mistaken.

  3. #3
    Hyperactive Member guyvdn's Avatar
    Join Date
    Oct 2002
    Location
    Belgium
    Posts
    336

    Re: How uniquie is the cpu id ?

    So when the user of your program buys a new computer he cannot use it any more?
    To deny our own impulses is to deny the very thing that makes us human

  4. #4

    Re: How uniquie is the cpu id ?

    I'd like to hope there'd be a system where the user can change their license key to match their system's.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Dec 2005
    Location
    UK
    Posts
    127

    Re: How uniquie is the cpu id ?

    so i can keep track of who is using the software ... and yes I am putting in place a customer database so they can request a new licence key via the telephone, email and website.

    ensures that when i update the software only the registered users get the update and I can ensure to some extent they dont take the piss and install it on 20+ pcs.

    if i hard code everything (registration keys & encryption keys) it makes it less secure

  6. #6
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: How uniquie is the cpu id ?

    Sorry disregard
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  7. #7
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: How uniquie is the cpu id ?

    The ProcessorID is not unique at all. It doesn't identify the individual processor. Intel tried that some years ago and there was an uproar about privacy. The value you're getting there identifies the TYPE of the processor, not the processor itself.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Dec 2005
    Location
    UK
    Posts
    127

    Re: How uniquie is the cpu id ?

    thank you mcj ... ill look for another way of doing this ;0)

    is there something similar?

  9. #9
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: How uniquie is the cpu id ?

    U should try to use the HD id and the MAC id.
    That what i wanted to write before but i was searching for some info on the processor id.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  10. #10

    Thread Starter
    Lively Member
    Join Date
    Dec 2005
    Location
    UK
    Posts
    127

    Re: How uniquie is the cpu id ?

    Quote Originally Posted by sapator View Post
    U should try to use the HD id and the MAC id.
    That what i wanted to write before but i was searching for some info on the processor id.
    that sounds better these should be easier to access

  11. #11
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: How uniquie is the cpu id ?

    It's the same WMI script to access.
    MAC address is on Win32_NetworkAdapter
    For hd serial have a look here:
    http://www.codeproject.com/KB/cs/har..._serialno.aspx
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  12. #12
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: How uniquie is the cpu id ?

    Many companies now provide Hardware Locks (also called dongle). These are small devices that fit into user's PC via USB or parallel port. Use them instead of CPU ID etc. Though it would add slightly to the cost of your software, but your customers won't have reasons for asking for a duplicate license due to system upgrade, windows reinstall etc. etc.
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  13. #13

    Thread Starter
    Lively Member
    Join Date
    Dec 2005
    Location
    UK
    Posts
    127

    Re: How uniquie is the cpu id ?

    great reply pradeep but atm im just starting out i've redeveloped the whole registration process to use some 'special' encryption ... i can restore all the required data from one code and a separate app on the pc and as long as the software is installed on the same pc the codes will be the same install it on another it wont work unless they contact me via email .... going to setup an automated service based on customer id and if their support contract is valid ... it will give them up to 10 keys anymore and they'll need to contact me so i can investigate the reason they used 10 keys

    code works brilliantly and a word of advice attempting anything similar avoid using the system.management class its very slow and unreliable ... capture machine information using something consistant and reliable

  14. #14
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: How uniquie is the cpu id ?

    Quote Originally Posted by illskills View Post
    great reply pradeep but atm im just starting out i've redeveloped the whole registration process to use some 'special' encryption ... i can restore all the required data from one code and a separate app on the pc and as long as the software is installed on the same pc the codes will be the same install it on another it wont work unless they contact me via email .... going to setup an automated service based on customer id and if their support contract is valid ... it will give them up to 10 keys anymore and they'll need to contact me so i can investigate the reason they used 10 keys
    They will always have n number of alibi to get licenses from you for free. And most often than not, you will have to provide them even if you know that they are lying. e.g. My system crashed, I changed my harddisk, I upgraded to new system etc. etc.

    With the Hardware Lock, one license can be locked to one person independent of their system. If they want to use it on their home pc they plug that dongle to their home pc. Later if they want to use it on their laptops, they remove from home PC and plug it onto the laptop etc. At one time they will be able to run your software on only one system. And I think this is correct, since they are authorized for one license independent of system they want to run on.
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  15. #15

    Thread Starter
    Lively Member
    Join Date
    Dec 2005
    Location
    UK
    Posts
    127

    Re: resolved - How uniquie is the cpu id ?

    im going to google this ... as it could come in handy in future.

    but is far to expensive for me to roll out atm.

    im just starting out, used to work for a software house, but am going it alone now.

  16. #16
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    Re: How uniquie is the cpu id ?

    Quote Originally Posted by Pradeep1210 View Post
    With the Hardware Lock, one license can be locked to one person independent of their system. If they want to use it on their home pc they plug that dongle to their home pc. Later if they want to use it on their laptops, they remove from home PC and plug it onto the laptop etc. At one time they will be able to run your software on only one system. And I think this is correct, since they are authorized for one license independent of system they want to run on.
    Just don't use any type of flash media (flash drives, any of the cards used in phones/pda's/digital camera's) as those can be cloned extremely easily. If you deploy your app with a flash drive, the end user can clone it to as many other flash drives as they want (and flash drives are extremely cheap to buy, especially in bulk).
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  17. #17
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: How uniquie is the cpu id ?

    Quote Originally Posted by JuggaloBrotha View Post
    Just don't use any type of flash media (flash drives, any of the cards used in phones/pda's/digital camera's) as those can be cloned extremely easily. If you deploy your app with a flash drive, the end user can clone it to as many other flash drives as they want (and flash drives are extremely cheap to buy, especially in bulk).
    If you implement it in the right way, it's not so easy to get through it. When implemented in the correct way, your program will work with the original device and would fail with the cloned device.

    However I agree that it is very much possible to make exact clones of the device and/or bypass it completely. But that's a different story altogether. All encryption can be broken or hacked and this is no exception. But at least it addresses your problem of making program independent of the PC, which a software solution alone won't be able to provide.
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  18. #18
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    Re: resolved - How uniquie is the cpu id ?

    Dude, just use MAC and-or HD.
    What is better? To have to user plug and unplug a device that may taking space and place on usb's or to have him do nothing.
    In the worst scenario he could unscrew the network and hd and move them to another computer but he still would need the exact same hd to use the application. If the hd is broken then he can request another key from you.
    Of course everything can be cracked-broken but it's much easier to copy a flash in another flash than to copy hd and mac.This for media compare for copy devices.
    On the side of cracking the program then it does not make any difference what u use because the exe or registry or dll is altered so the program will play in any media.So in this case, again, is more useful to have the user plug nothing in the usb.
    Also lastly you can forget or lose the usb(i've lost 5 this year) or accidentally damage it, especially if it's in a laptop.
    I'm also not sure if the flash drive have a unique id or just a unique id of the whole type of the flash. P.E. all sony usb 8gb rxxx12 flashes have an id of 111xxxx or every sony usb 8gb rxxx12 flash has a different id.
    ἄνδρα μοι ἔννεπε, μοῦσα, πολύτροπον, ὃς μάλα πολλὰ
    πλάγχθη, ἐπεὶ Τροίης ἱερὸν πτολίεθρον ἔπερσεν·

  19. #19
    PowerPoster 2.0 Negative0's Avatar
    Join Date
    Jun 2000
    Location
    Southeastern MI
    Posts
    4,367

    Re: resolved - How uniquie is the cpu id ?

    Be careful with MAC address though. I have multiple network cards in my PC (wired, wireless, bluetooth, and 2 VMWare) and I have had issues with software because I installed it when I was on a wired network and I tried to run it when I was in a wireless network.

  20. #20
    Addicted Member
    Join Date
    Jan 2008
    Location
    Essex, UK
    Posts
    149

    Re: How uniquie is the cpu id ?

    Quote Originally Posted by formlesstree4 View Post
    I believe each CPU has a different ID, but I could be mistaken.
    It is not. If you buy a CPU from a batch of stock from the same supplier they will have the same ID. I know this as we batch build hardware and i have tested this copy protection method out on them.
    Development Enviroment: Visual Studio 2008, VB.NET

    Recommend Winspector, far better then SPY++
    http://www.windows-spy.com/

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width