Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / October 2003



Tip: Looking for answers? Try searching our database.

Bind an application to a specific PC

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bilbo Baggins - 27 Oct 2003 14:28 GMT
Hey,

I am looking for ideas on how i could hard code my application (VB6) such
that it would be difficult to get it to run on any other machine other than
the one i want it to. Obviously this is a common problem for commercial
software vendors around the world, but in my case the software im writing
will only run on a small  number of specific computers so compiling the app
specificially for each machine is no drama.

Now what im thinking of doing is obtaining specific static information about
each host machine, such as its MAC address, Host Name, IP Address etc..
using WMI or something and then hardcoding these details into each compile
of the code. When the code was executed on the host, it would first check
for these details and if they didnt match, execution simply stops no error
message, no log it just wont run.
I dont really need something that is military bullet proof (although that
would be nice), just something relatively simple that i can do to make it
harder for any would be crax0r to run my code on his box. Perhape with
security certs? I dunno..

Any ideas other appreciated.. :)
BB
the Wiz - 28 Oct 2003 01:34 GMT
>Hey,
>
[quoted text clipped - 18 lines]
>Any ideas other appreciated.. :)
>BB

Think about maintenance:

DHCP network - possible new IP address at each boot

network card replaced - new MAC address

Windows reloaded - possible change of host name

For a more generic solution, albeit a more expensive one initially, use a
security dongle.  The devices are available in serial, parallel, and USB
formats.  They can be as simple as an eprom that returns a code or a
microprocessor-based "smart" device that keeps time and requires resetting
yearly to maintain the license.  Now your program is identical for every
machine, changing hardware or software has little or no effect, and the program
only runs when the dongle is in place.

Note that although I evaluated dongles, I never used them.  I currently program
web-based applications.

Listing of many copy protection and licensing products:
http://dmoz.org/Computers/Security/Products_and_Tools/Software_Protection_and_Li
cense_Control/


Some vendors that give prices:
http://www.lockware.com/ref1/Products.htm

http://www.microcosm.co.uk/ddprice.htm

I've used the evaluation kits from these companies (back in the days of
DOS/Win3.x)
http://www.rainbow.com/sentinel/index.html

http://www.marx1.com/ProductPage.htm

Products for Windows 3.x through XP, plus Mac and Linux:
http://www.ealaddin.com/hasp/default.asp?cf=tl

More about me: http://www.jecarter.com/
VB3/VB6/NSBasic Palm/C/PowerBasic source code: http://www.jecarter.com/programs.html
Drivers for Pablo graphics tablet and JamCam cameras: http://home.earthlink.net/~mwbt/
johnecarter at@at mindspring dot.dot com. Fix the obvious to reply by email.
Bilbo Baggins - 29 Oct 2003 01:33 GMT
Thanks for the post please see my comments below...

Regarding maintenance, i agree this potentially quite troublesome, however
in this particular situation, i am probably only dealing with up to 10-15
different servers maximum that will be running this application. They all
have static IP addresses (No DHCP) and i have remote access to each one, so
if an OS requires reloading i will know about it anyway. The dongle idea is
perfect, however the money people at my work will see it differently im
sure.

What i have done, is write some simple WMI code that uses the processor ID
to identify the machine, and have the CPU id hard coded and compiled in to
the executable. I have also encrypted the strings so that they are not
stored in plain text in the code ( i got a rude shock when i opened my exe
in Ultraedit only to find out that compiled strings are still plain text
strings after a compile!). I will also have to ensure that the processor id
is enabled in the BIOS of each machine this code is to be run on.

Anyway here is the code snippet i wrote if anyone wants to use it.

------------------------------------------------------------
Function HostOK as Boolean 'requires WMI

myProcID =  my_encrypted_string

For Each oCpu In oWMI.instancesof("Win32_Processor")
     If oCpu.processorid = myProcID Then
           HostOK = True
           Exit For
     Else
           HostOK = False
     End If
Next

-------------------------------------------------------

I also wrote code for checking the Hostname, MAC Address and IP Address,
which is all essentially the same code but using different WMI classes
(Win32_NetworkAdapterConfiguration, Win32_NetworkAdapter,
Win32_NetworkAdapterConfiguration respectively)

Thanks again for your reply.
BB
easylm - 29 Oct 2003 16:31 GMT
You may also want to look at tools that will lock to logical machine
features as well as hardware features (such as EasyLicenser). Locking
to the logical machine name and/or user name is not quite as 'hard' as
locking to, say,  the MAC address, but has the advantage that it will
keep on working if the user upgrades their machine or has to fix a
portion of the hardware. Locking also avoids all the user aggravation
and distribution issues of dongles.

> >Hey,
> >
[quoted text clipped - 59 lines]
> Drivers for Pablo graphics tablet and JamCam cameras: http://home.earthlink.net/~mwbt/
> johnecarter at@at mindspring dot.dot com. Fix the obvious to reply by email.
Richard Iain Blakeway - 31 Oct 2003 04:37 GMT
I have written some commercial apps and any that have required licence I
have grabbed the hard drive serial number.
This is shown to the user as an 'unlock code' as I call it  which the user
sends to me,  I then send the user the licence code which when the algorithm
is applied to the unlock code generates the harddrive serial number! Which
the app checks against the harddrive that it is running on and either runs
or closes appropriately.

does that make sense, it is early in the morning here!

I will post some code if you like.

> Hey,
>
[quoted text clipped - 18 lines]
> Any ideas other appreciated.. :)
> BB
ceg - 31 Oct 2003 11:26 GMT
People have been doing it for decades.  That and the CPU codes as well as
various other hardware related codes.

> I have written some commercial apps and any that have required licence I
> have grabbed the hard drive serial number.
[quoted text clipped - 33 lines]
> > Any ideas other appreciated.. :)
> > BB
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.