Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Limit xla file to run on one computer

3 views
Skip to first unread message

Paul Keating

unread,
Mar 2, 2000, 3:00:00 AM3/2/00
to
I wish to protect a spreadheet or add-in so that it will only run on one
computer. I think the only way to acheive this is to access the registry
for unique information relating to the system.
Can anyone help?

regards

Paul Keating

Chip Pearson

unread,
Mar 2, 2000, 3:00:00 AM3/2/00
to
Paul,

Do you know specifically what machine? If so, one very simple way would be
to check the serial number of the C: drive. Simpler than reading the
registry.

Dim FSO As Scripting.FileSystemObject
Set FSO = New Scripting.FileSystemObject
If FSO.GetDrive("C:").SerialNumber <> 123456 Then
MsgBox "Wrong machine"
End If

From the VBA Tools menu, go to References, and put a check next to
"Microsoft Scripting Runtime". You need to have one of more of Windows98,
Windows2000, Visual Studio 6, Internet Explorer 5, or Office2000.

--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting Services
www.cpearson.com ch...@cpearson.com


"Paul Keating" <N...@btinternet.com> wrote in message
news:eUN1RUDh$GA....@cppssbbsa02.microsoft.com...

Myrna Larson

unread,
Mar 2, 2000, 3:00:00 AM3/2/00
to
On Thu, 2 Mar 2000 07:33:16 -0600, "Chip Pearson" <ch...@cpearson.com> wrote:

>Do you know specifically what machine? If so, one very simple way would be
>to check the serial number of the C: drive. Simpler than reading the
>registry.
>
>Dim FSO As Scripting.FileSystemObject
>Set FSO = New Scripting.FileSystemObject
>If FSO.GetDrive("C:").SerialNumber <> 123456 Then
> MsgBox "Wrong machine"
>End If
>
>From the VBA Tools menu, go to References, and put a check next to
>"Microsoft Scripting Runtime". You need to have one of more of Windows98,
>Windows2000, Visual Studio 6, Internet Explorer 5, or Office2000.

If your user has a hard-drive crash and must replace the drive, he isn't going
to be very fond of you <g>.


Chip Pearson

unread,
Mar 2, 2000, 3:00:00 AM3/2/00
to

> If your user has a hard-drive crash and must replace the drive, he isn't
going
> to be very fond of you <g>.

Of course, but that assumes that the users are fond of me to begin with.
That's debatable. And if you have a drive crash, the registry is gone, too,
so you can't use a registry entry, either. Basically, there is really no
way to distribute a program (or workbook) and be able to ensure that it can
only run on a single machine, and cannot be copied to another machine.

If the drive s/n is known ahead of time (which seemed to be implied by the
original post), then using the FileSystemObject is a pretty simple way to
get a unique ID of the system. And hard drive crashes are very rare, these
days. My new Western Digital drive is rated at about 500,000 hours Mean
Time Between Failures, more than 50 years.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting Services
www.cpearson.com ch...@cpearson.com

"Myrna Larson" <myrna...@home.net> wrote in message
news:t40ubs45tu383mkao...@4ax.com...

Tom Ogilvy

unread,
Mar 3, 2000, 3:00:00 AM3/3/00
to
Chip,
I have had at least 6 hard drive crashes in the last 4 years (I am sure I
have lost count) - Every Western Digital I have purchased has failed in less
than a year. (Needless to say, I don't buy Western Digital anymore and
Micropolis has gone out of business along with their 5 year waranty - no
mystery there - most of the replacements for the Micropolis drives have
failed as well). So I would take those mean time between failure
projections with a grain of salt and a large measure of foresight. (After
all, no PC drive has lasted 50 years yet - it could be a mtbf of 50 with a
Std Dev of 200 yrs on an Exponential). The maxtor SCSI that came with the
computer in 1992 continues to hum right along (at 500KB though, it is not
much use).

Just a little shared experience.

Regards,
Tom Ogilvy


Chip Pearson wrote in message ...

John Whitling

unread,
Mar 3, 2000, 3:00:00 AM3/3/00
to
Just how much money would you be willing to spend to control your software? I
use keys for my extensive applications but sadly the "disable macros"
security option limits that effectiveness. You can however check fro the
presence of a key in the routines that you run. I would recommend that it
occur randomly to make finding it and breaking it and frustrating
proposition.

There is no "sure fire" solution that I have found. I sure would love to have
some dialog on this issue.

0 new messages