Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to create CD Key hardware key and hwo to embed that in Executable file in install time

How to create CD Key hardware key and hwo to embed that in Executable file in install time

Scheduled Pinned Locked Moved Visual Basic
tutorialcsharphardwarealgorithms
6 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    JayKhatri
    wrote on last edited by
    #1

    Hi Experts, I would like to capture Harddisk and processor serial No. apply some algorithm over it and generate a new encrypted ID. Further I like to embed this ID to the installed exe. So that it check everytime the same hardware when it run. Can anyone tell this by any example. I am using VS2005 and my project is on Vb.Net. Thanks in advance. Jay Khatri

    G L 2 Replies Last reply
    0
    • J JayKhatri

      Hi Experts, I would like to capture Harddisk and processor serial No. apply some algorithm over it and generate a new encrypted ID. Further I like to embed this ID to the installed exe. So that it check everytime the same hardware when it run. Can anyone tell this by any example. I am using VS2005 and my project is on Vb.Net. Thanks in advance. Jay Khatri

      G Offline
      G Offline
      Garth J Lancaster
      wrote on last edited by
      #2

      you could use WMI for both, or for example, this get Physical HDD serial number without WMI[^] for the disk, serial number is likely out there somewhere. Similarly, encryption code is easy to find - if you look here on CP you'll find most of what you need including building keys, look for articles by Jeffrey Walton for-instance We dont in general supply code to people - you have to do the research/grunt work yourself - once you have difficulties with a particular piece of code you can ask back here. 'g'

      J 1 Reply Last reply
      0
      • G Garth J Lancaster

        you could use WMI for both, or for example, this get Physical HDD serial number without WMI[^] for the disk, serial number is likely out there somewhere. Similarly, encryption code is easy to find - if you look here on CP you'll find most of what you need including building keys, look for articles by Jeffrey Walton for-instance We dont in general supply code to people - you have to do the research/grunt work yourself - once you have difficulties with a particular piece of code you can ask back here. 'g'

        J Offline
        J Offline
        JayKhatri
        wrote on last edited by
        #3

        obtaining hard disk serial No. and processor will be done there. I was having the code you had suggested. My issue is how will I embed the encrypted code in exe at install time so that any person who copy the exe will not be able to run on his pc and even if someone extract exe from my setup will also fail to do so. I would like to have your comments upon it. Thanks Jay

        G 1 Reply Last reply
        0
        • J JayKhatri

          obtaining hard disk serial No. and processor will be done there. I was having the code you had suggested. My issue is how will I embed the encrypted code in exe at install time so that any person who copy the exe will not be able to run on his pc and even if someone extract exe from my setup will also fail to do so. I would like to have your comments upon it. Thanks Jay

          G Offline
          G Offline
          Garth J Lancaster
          wrote on last edited by
          #4

          Yup, well, that's the hard part - there are a number of options ... basically as pointed out in Tamper Aware and Self Healing Code[^] you can store them in the exe itself as a binary resource - here's one technique Adding and extracting binary resources[^] You could also use hidden registry keys, files .. I would seperately encrypt the resource data/registry key/file anyway .. Another place to store your product key is on a 'USB Dongle' or such, so the Dongle has to be present etc to start the software - SafeNet and UniKey market such products (no Im not affiliated with either of them) - these offer benefits that they offer some level of encryption themselves, negating the seperate encryption/hiding of the data required to check a product key Eventually it all comes down to the same, someone with enough time and motivation will crack your software.

          J 1 Reply Last reply
          0
          • G Garth J Lancaster

            Yup, well, that's the hard part - there are a number of options ... basically as pointed out in Tamper Aware and Self Healing Code[^] you can store them in the exe itself as a binary resource - here's one technique Adding and extracting binary resources[^] You could also use hidden registry keys, files .. I would seperately encrypt the resource data/registry key/file anyway .. Another place to store your product key is on a 'USB Dongle' or such, so the Dongle has to be present etc to start the software - SafeNet and UniKey market such products (no Im not affiliated with either of them) - these offer benefits that they offer some level of encryption themselves, negating the seperate encryption/hiding of the data required to check a product key Eventually it all comes down to the same, someone with enough time and motivation will crack your software.

            J Offline
            J Offline
            JayKhatri
            wrote on last edited by
            #5

            Yes exactly Hardware lock is a gud option but I will not be able to select due to company's policy, cracking exe is also possible, if someone know assembly lang. Even I had cracked Xara 3D for educational purpose. It was as easy as to change je to jre. So will it be better to enter an encrypted code separately. I like to encrypt my software as much as possible. Further I would like to make my exe tamper aware and self die. Thanks for you prompt reply. Jay

            1 Reply Last reply
            0
            • J JayKhatri

              Hi Experts, I would like to capture Harddisk and processor serial No. apply some algorithm over it and generate a new encrypted ID. Further I like to embed this ID to the installed exe. So that it check everytime the same hardware when it run. Can anyone tell this by any example. I am using VS2005 and my project is on Vb.Net. Thanks in advance. Jay Khatri

              L Offline
              L Offline
              LloydA111
              wrote on last edited by
              #6

              If you embed the key inside the executable, then there is always the possibilty (however small) that someone will extract the key with a tool like Resource Hacker^ or, if they are really determined, they will do it with a hex editor. So encryption is a must.

              If everything was not true, would it be not true that everything is not true? So by saying everything is not true, you are automatically denying that everything is not true. Im so confused... FreeDOS - An open source modern MS-DOS/PC-DOS replacement.

              1 Reply Last reply
              0
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • World
              • Users
              • Groups