Suggestions of writng product license key in Win Vista

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,

We would like to write the license key in a file and write it in System32 of
Windows Vista, but the permission is denied. What directory do you suggest
to write the file in without any security protection?
 
Mike9900 said:
Hello,

We would like to write the license key in a file and write it in System32
of
Windows Vista, but the permission is denied. What directory do you
suggest
to write the file in without any security protection?

Once again, you need to post to a Vista NG so that you can get help in those
NG(s).

Even with me being Admin on this Vista computer, if I wanted to use Notepad
to create a file and save the file in System32, then Notepad has to be
started using Run As Administrator to escalate NotePad's privileges to write
the file to the System32 directory.

Again, the Vista UAC Manifest might have to come into play for you.
 
Mike9900 said:
Hello,

We would like to write the license key in a file and write it in System32
of
Windows Vista, but the permission is denied. What directory do you
suggest
to write the file in without any security protection?

The same directory you install your executables to. The onus is then on the
user to give you a writable directory to install into.
 
That would not help, because the user would uninstall the software and
deletes the file with the directory. So the app can run again for another 30
times. I want the app to get expired after 30 uses.
 
Mike9900 said:
That would not help, because the user would uninstall the software and
deletes the file with the directory. So the app can run again for another 30
times. I want the app to get expired after 30 uses.

The first thing you need to understand is that there is _no_ way for you
to absolutely prevent a user from running your application more than 30
times. The real question is how much effort do you want to put into it,
and how annoyed do you want your legitimate users to be?

I can tell you that I personally _really_ dislike applications that
don't uninstall completely. But that's essentially what you have to do
in order to have data stored on the user's computer to track the
expiration. You need to hide that data somewhere so that it's harder
for the user to find it.

Note that no matter how good a job you do of hiding the data, some user
_will_ find it. And the better a job of hiding the data you do, the
more likely you are to run into general impolite or downright slimy
implementation details.

One of the best trial mechanisms I've run across involves activating the
product with a key issued by the developer. The key is actually an
encrypted blob of data in user-readable text form (that is, just capital
letters and numbers) that contains either a permanent unlock code or
some time-limited code. For a trial, the company issues a time-limited
code, and once purchased they issue a permanent code.

I still am not a big fan of stuff like that, the main reason being that
I am forever dependent on either keeping track of my key or of the
company being around to issue a new one (see Microsoft's Product
Activate "feature" for an example of the latter, since even keeping a
copy of the key doesn't help you with their stuff). But at least it's
completely transparent. That is, the data's not being hidden anywhere
and I can in fact uninstall the application in a complete way, since the
application has no need to hide any of the data from me.

Even with this mechanism, there are work-arounds. That particular
company issues keys based on a registered account, but there are no
limitations registering. You just need a new email address, and since
it's trivial to generate a new email address any time you want, you can
always get a new key when the trial runs out.

But really, if you've got someone who is going that route to use your
product for free indefinitely, it's not all that likely that they'd pay
for the licensed version anyway. A better solution is to offer the
product at a reasonable price, so that otherwise-legitimate customers
aren't motivated to bypass a paid, retail license.

Pete
 
The first thing you need to understand is that there is _no_ way for you
to absolutely prevent a user from running your application more than 30
times. The real question is how much effort do you want to put into it,
and how annoyed do you want your legitimate users to be?

Peter is right - there is no 100% foolproof way of doing this. It
can take quite a lot of work to do a reasonable job. Whatever method
you use it is generally better to impose some other restrictions
during as a trial period that will encourage users to purchase even if
they do discover how to get around your trial period. Ideally these
limitations should still enable the user to fully evaluate your
product. A common method for applications that product printed or
other graphic output is to watermark the output if there is no
license.

If you are open to a reasonable priced commercial solution then
Infralution's Licensing System allows you to do evaluations using
either of the two approaches Peter suggested. You can use the
EvaluationMonitor class to store the information in an obscure (and
semi-random) location in the registry or you can issue license keys
which have the evaluation end date embedded in them. You can get
more information and download a trial version from:

www.infralution.com/licensing.html

Regards
Grant Frisken
Infralution
 
Mike9900 said:
Hello,

We would like to write the license key in a file and write it in System32
of
Windows Vista, but the permission is denied. What directory do you
suggest
to write the file in without any security protection?

Use machine scoped isolated storage. See System.IO.IsolatedStorage.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top