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. Prevent exe from being copied and run on another pc

Prevent exe from being copied and run on another pc

Scheduled Pinned Locked Moved Visual Basic
questiontutorial
18 Posts 8 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.
  • P Paul Conrad

    As I mentioned to the OP, could always store the machine's serial number info in the database and have the app check against known values at runtime. If it doesn't find the machine's serial number in the database, just have the crap out without any warning [evil grin]...

    "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

    A Offline
    A Offline
    Ashfield
    wrote on last edited by
    #9

    Yep, that would work, although I prefer to prevent any access to the database... and then crap out :laugh:

    Bob Ashfield Consultants Ltd

    P 1 Reply Last reply
    0
    • A Ashfield

      Yep, that would work, although I prefer to prevent any access to the database... and then crap out :laugh:

      Bob Ashfield Consultants Ltd

      P Offline
      P Offline
      Paul Conrad
      wrote on last edited by
      #10

      Ashfield wrote:

      prefer to prevent any access to the database...

      Perhaps just have a separate database for licensing purposes.

      "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

      A 1 Reply Last reply
      0
      • P Paul Conrad

        Ashfield wrote:

        prefer to prevent any access to the database...

        Perhaps just have a separate database for licensing purposes.

        "The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon "Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham

        A Offline
        A Offline
        Ashfield
        wrote on last edited by
        #11

        Could do. There are loads of options really.

        Bob Ashfield Consultants Ltd

        A 1 Reply Last reply
        0
        • A Anoop Brijmohun

          Hi Guys, I have written an application using vs2005 that connects to sql2005. i have installed it on several user computers. how can i prevent a user from copying the exe/program from their pc and using it on another site/company. i have thought about hardcoding the m/board serial number into the app(but this is not a good option) i also thought about creating a license file but not sure on how to cos the user can copy the exe and lic file as well. any ideas? thanks in advance... Anoop

          S Offline
          S Offline
          Sarani Ravindran
          wrote on last edited by
          #12

          Hi, You can have a separate table in your database that stores the processor ids of your machines that are allowed to run the app. Have the app check against with those ids in the database before running. If you want more details,have a look at this article. http://www.codeproject.com/KB/vb/hardware_Security_2.aspx[^] :)good luck.

          Believe!Success is always yours.

          1 Reply Last reply
          0
          • T Tom Deketelaere

            preventing a copy isn't possible (for as far I know) What you could do is generate a code (using the pc name or something else unique for that pc) wich the user then has to send to you and you create a key from that (and send it back to the user). That way the key is specific for the pc and even if the user copy's the file (and try's to use the same key) the program is not going to work (will ask for a new key) You can store the key anyway you like since it is pc specific.

            A Offline
            A Offline
            Anoop Brijmohun
            wrote on last edited by
            #13

            Hi Thanks for your response , do you perhaps have a sample project or maybe a site i can visit for ideas? Thanks Again Anoop

            1 Reply Last reply
            0
            • A Ashfield

              Could do. There are loads of options really.

              Bob Ashfield Consultants Ltd

              A Offline
              A Offline
              Anoop Brijmohun
              wrote on last edited by
              #14

              Hi Thanks for your response and the ideas, however, lets also suppose the app is installed at a particular company, there is an administrator who has authority to access all sql dbs, lets also suppose that the sister company can at any stage walk in, have a look at the software and then make copy of the software and sql db and take it with them... how do i prevent this from happening... i would think i need some sort of lic key generated that includes the licensed company... any ideas>?????? thanks again Anoop

              1 Reply Last reply
              0
              • L Luc Pattyn

                Hi, for off-line copy protection the only solution AFAIK relies on some hardware characteristics. You must either choose built-in hardware or a separate protection device such as a dongle. Choosing things the user can change (such as computer name) does not make sense to me. Choosing things the user might want to change (CPU type, amount of RAM, disk serial number, etc) would be annoying: changing them for a good reason might break the software. Baseboard numbers look great, except I was told they get stored in the BIOS and get lost when you upgrade your BIOS, resulting in all dependent software becoming useless. So I would opt for an external piece of hardware. Dongles, costing a few tens of dollars/euros, are fine for expensive software. For cheaper software my first choice would be USB sticks, they all seem to have a unique serial number which you can retrieve through WMI (also as a regular user on Vista), and most users already have one or more USB sticks for other purposes anyhow. So have them provide their serial number, encode it in a license file, and have the app check the USB stick against the license file. :)

                Luc Pattyn [Forum Guidelines] [My Articles]


                Fixturized forever. :confused:


                M Offline
                M Offline
                Mycroft Holmes
                wrote on last edited by
                #15

                USB - now I didn't know that. You could actually get the user to register a USB and periodically (every couple of months) ask for a validation. If it fails they need to get in touch to register another USB and you can deal with that. And then you have my position where corporate have disavled the USB slots on all machines :-O

                Never underestimate the power of human stupidity RAH

                T 1 Reply Last reply
                0
                • M Mycroft Holmes

                  USB - now I didn't know that. You could actually get the user to register a USB and periodically (every couple of months) ask for a validation. If it fails they need to get in touch to register another USB and you can deal with that. And then you have my position where corporate have disavled the USB slots on all machines :-O

                  Never underestimate the power of human stupidity RAH

                  T Offline
                  T Offline
                  Tom Deketelaere
                  wrote on last edited by
                  #16

                  There are systems out there that use a USB stick to validate a program. If the stick isn't present the program isn't going to start. It has several advantages - Program is licensed (biggest one for the programmer) - The user can secure its usage (if he takes the stick out nobody else will be able to use it) - It's not specific to a pc but per user so the user can install it on a differant pc and use the same stick (not at the same time) - It's not that difficult (at least from what I hear (not my department)) - It's not expensive (just look at the price of usb sticks these days) (Don't know why I didn't think of this when I posted my answer, we use it, must be the lack off sleep latly :sigh: )

                  A 1 Reply Last reply
                  0
                  • T Tom Deketelaere

                    There are systems out there that use a USB stick to validate a program. If the stick isn't present the program isn't going to start. It has several advantages - Program is licensed (biggest one for the programmer) - The user can secure its usage (if he takes the stick out nobody else will be able to use it) - It's not specific to a pc but per user so the user can install it on a differant pc and use the same stick (not at the same time) - It's not that difficult (at least from what I hear (not my department)) - It's not expensive (just look at the price of usb sticks these days) (Don't know why I didn't think of this when I posted my answer, we use it, must be the lack off sleep latly :sigh: )

                    A Offline
                    A Offline
                    Ashfield
                    wrote on last edited by
                    #17

                    Only trouble with using usb sticks, more and more corporates are disabling the ports to prevent unauthorised copying - particularly in the UK where there have been some high profuile data losses due to usb sticks. In my current client company any device plugged into a usb port gets automatically encrypted - not good for your ipod!

                    Bob Ashfield Consultants Ltd

                    T 1 Reply Last reply
                    0
                    • A Ashfield

                      Only trouble with using usb sticks, more and more corporates are disabling the ports to prevent unauthorised copying - particularly in the UK where there have been some high profuile data losses due to usb sticks. In my current client company any device plugged into a usb port gets automatically encrypted - not good for your ipod!

                      Bob Ashfield Consultants Ltd

                      T Offline
                      T Offline
                      Tom Deketelaere
                      wrote on last edited by
                      #18

                      Yeah but these sticks don't actualy hold data (from the company) they just hold a key and the program checks if the stick (so the key) is present. The sticks themself can't be accesed so no data can be placed on them. And I just found out that it's possible to have only 1 stick for an entire network so the stick could be plugged into a server in the server room that normally should be secure

                      Ashfield wrote:

                      In my current client company any device plugged into a usb port gets automatically encrypted - not good for your ipod!

                      But but what will you listen to then :)

                      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