Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default how to protect a program

Hi,

I have an application that uses a lot of VBA. I put it in a protected password add in. But I am also worried of people moving to other companies and taking the program.

In the past I used a trick to put a couple of files in different folders and the program will verify the existence of those files before running.

The problem is that now with the new Windows versions, I cannot access automatically those folders (for instance c:\windows\system\) to create the files with the installation program (another VBA file to which only I have access). this is quite annoying and ogetn I have to create the file manually, which is a bit pointless if the user is just standing behind you...

Any suggestion to a similar procedure? a file, a windoes registry entry... .... anything that I can create, access, and delete from an Excel VBA application in any PC.

thanks.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default how to protect a program

Prtecting apps from unauthorized use is only effective for keeping
honest folk honest. Otherwise, there's not much you can do when your
app is not in a DLL or EXE. If someone wants your app badly enough,
there's free password stripper apps out there they can use to break
into your VBA (with macros disabled). Once there, they can
bypass/remove any code that restricts them from using the app.

If you can put your project in a DLL then it would be more difficult
for people to hijack it (but still not impossible). You could also
store an 'activation' file in the same folder, that contains encrypted
machine info so it won't run on any other machine than the one your
'activation' file is written for. This in turn should use an
'activation key' provided by you that your app requires at 1st startup.
Your app then writes the key into the encrypted file so it's available
on subsequent startups. Since the key is contrived from the machine
info in the activation file, the key will only work on the machine it
was created for.

Summary:
1. Put your app into a DLL or EXE.

2. Devise a methodology in your app for 'licensing' it to a specific
machine. This will require some consistent way to collect this on
different machines, as well as a consistent process for
encrypting/decrypting the data stored in the activation file.

3. Write an 'activation key' generator app for generating keys. Note
here that your distributed app will need to produce the same key from
the host machine info, thus both MUST use the same methodology.

4. Make sure your app is installed in a folder users have write
permissions for. This will be needed so your app can write the
activation file on 1st startup. This initial file will be missing a
'validation flag' until the user inputs your activation key.

Activation Process:

A. App creates machine info file on 1st startup.
B. User emails file to you.
C. You generate an activation key from the file info.
D. You email the key to the user.
E. User inputs the key at startup.
F. IF the key validates, your app rewrites the activation file
with a validation flag appended to the info so it knows not to
request a key for subsequent startups.

Notes:

- Your encrypted file should also be encoded in Base64 format for
emailing purposes. This precludes then, that your solution will require
an encrypt/decrypt algorithm AND Base64 encode/decode procedures.

- Your app will require use of WMI (or something similar) to collect
machine info. There are many examples out there for how to get this
info. I suggest using the BIOS serial number since the only way to
change it is by replacing the motherboard (which effectively makes it a
new machine and so will require you to provide a new activation key).


There's also free 3rd party solutions available, if you can't make your
own, which I'm sure some others will mention at some point.

HTH

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can protect worksheet then workbook but not Protect and Share in code [email protected] Excel Programming 7 January 16th 17 07:01 AM
"How do I un/protect sheet by macro program with password Maruza Excel Programming 5 September 23rd 07 01:16 AM
Macro program protect Daniel Excel Programming 1 July 3rd 07 02:29 AM
To protect the program Yanto Excel Programming 2 April 16th 04 05:09 PM
merging excel program with tdc finance program judy Excel Programming 0 November 5th 03 08:01 PM


All times are GMT +1. The time now is 10:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"