Hi Jonathan,
Thanks very much for the response and the points to ponder
I do have VB6 but I've never written a dll or a 'stub' for that matter so
I'll have to start reading and testing. I will definitely look at the
serial number suggestion, that may really help a lot. Again, thanks a lot
for helping out
Karen
Karen said:
Hi All,
I've developed a Word template that I want to distribute as a product,
something folks buy and pay for
I have lots of questions. I know that
templates are, by definition, to be shared but I want to decrease the
possibility of a customer purchasing it and distributing it freely to all
of his/her buddies.
The Microsoft 'activation' scheme keeps me from giving their software to
any Tom, Dick or Harry. Is there some sort of comparable mechanism that a
small-time entrepreneur could use?
This is probably not the right newsgroup to ask these sorts of questions,
any suggestions on where I would post questions about distribution of a
template as a commercial endeavor?
As I see it your problem is on two levels
1. How do you stop people freely distributing your template as is to their
10 best friends?
2. How do you stop people hacking in to your template, looking at the source
code, and modifying it to disable any protection you have in there?
No solution to item #1 is worth anything unless you can also solve #2, so
let's look at that first. VBA code in a Word template is inherently
vulnerable - there are tools about that will remove password protection from
VBA projects in no time, no matter how strong the password. Therefore, you
will probably have to move at least some of your code out into an ActiveX
DLL where the source code is no longer present, and call the DLL from code
stubs within your template. Probably the easiest way of doing this is to get
a copy of VB6 from somewhere. The language is pretty nearly the same as VBA
and the VB6 runtimes are distributed with every version of Office from 2000
onwards, so you won't have much in the way of additional dependencies. That
solves problem #2 provided you do it right
Then you need to find a way of ensuring that your code will run only on
authorised machines, and have that protection code in your DLL, not in your
template. There are a number of possible approaches here. There is always
the issue of whether the increase in protection is going to be countered by
the decrease in usability, so you might find it appropriate to offer it with
reduced functionality and no protection, and offer registered users
additional features.
One way of generating some kind of unique key might be if you get the serial
number off the host machine's C drive, have a user provide that when
registering, and combine it with a predefined code in some way to generate a
machine-specific key. The program won't run unless the correct key is stored
somewhere. Karl Peterson has code on his website that allows you to get the
serial number of any drive. Take a look at his DrvInfo project here
http://vb.mvps.org/samples/descriptions.asp#DrvInfo
--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup
Keep your VBA code safe, sign the ClassicVB petition
www.classicvb.org