Dongle Lock

   I have an  executable program (exe). I dont have the source code.

 Can I lock this Exe with a dongle ??

 If possible then how do i do it ?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Yes. Most dongle vendors give you 3 things: the dongle itself, a library that let you verify the presence of the dongle from within you source code AND a program that just takes an existing exe  and modify it so that it runs only if the dongle is present.
In general, if you use the library function you can achieve better security, but if you don't want to bother or don't have the source code you can just "protect" the executable.

The exececutable is usually encrypted and modified so that upon startup it checks for the presence of the dongle and if it finds one it asks the dongle to decrypt the rest of the program. So if you don't have the dongle, you can't run the program nor disassemble it (in theory).

Note that some vendors don't support ANY exe, but just some (usually those compiled with microsoft compilers).
For example, my version of Hardest crashes when protecting programs compiled with cygwin g77; Rainbow Sentinel also seem to have problems witht DLL generated in Cygwin. Wibu-Key from WibuSystem has been able to protect any win32 (PE Format) exe I throw at it up to now (including those on which Sentinel and Hardest failed) - also I think they can send you a demo unit for free (at least they used to).


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
You can lock it with a dongle as lbertacco stated, but using the method he mentioned will result in a drastic performance hit within the application. Wrapping an EXE and then making it look for specific hardware on start up will freeze up all but the newest computers. Your customers will not appreciate it, especially if they paid for something that is truly worth a dongle(i.e. EXPENSIVE)!

Well I don't know exactly what mugman21 mean, but checking for the presence of a serial, parallel or USB dongle plus decrypting the exec takes just a fraction of a second and you won't notice it even on very old hardware (even old 386)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.