[AccessD] Q: using the host id to protect copyright in Access

Jim Lawrence accessd at shaw.ca
Sat Jan 22 21:01:49 CST 2005


Hi John:

Here is a listing from a series of MS scripts that I think Marty supplied
the URL to, that should get the serial numbers you need. It should be able
to be recoded to straight VB.

<code>
On Error Resume Next

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery("Select * from Win32_BaseBoard")

For Each objItem in colItems
    For Each strOption in objItem.ConfigOptions
        Wscript.Echo "Configuration Option: " & strOption
    Next
    Wscript.Echo "Depth: " & objItem.Depth
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "Height: " & objItem.Height
    Wscript.Echo "Hosting Board: " & objItem.HostingBoard
    Wscript.Echo "Hot Swappable: " & objItem.HotSwappable
    Wscript.Echo "Manufacturer: " & objItem.Manufacturer
    Wscript.Echo "Model: " & objItem.Model
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "Other Identifying Information: " & _
        objItem.OtherIdentifyingInfo
    Wscript.Echo "Part Number: " & objItem.PartNumber
    Wscript.Echo "Powered-On: " & objItem.PoweredOn
    Wscript.Echo "Product: " & objItem.Product
    Wscript.Echo "Removable: " & objItem.Removable
    Wscript.Echo "Replaceable: " & objItem.Replaceable
    Wscript.Echo "Requirements Description: " &
objItem.RequirementsDescription
    Wscript.Echo "Requires Daughterboard: " & objItem.RequiresDaughterBoard
    Wscript.Echo "Serial Number: " & objItem.SerialNumber
    Wscript.Echo "SKU: " & objItem.SKU
    Wscript.Echo "Slot Layout: " & objItem.SlotLayout
    Wscript.Echo "Special Requirements: " & objItem.SpecialRequirements
    Wscript.Echo "Tag: " & objItem.Tag
    Wscript.Echo "Version: " & objItem.Version
    Wscript.Echo "Weight: " & objItem.Weight
    Wscript.Echo "Width: " & objItem.Width
Next
</code> 

HTH
Jim


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John W. Colby
Sent: Saturday, January 22, 2005 4:57 PM
To: 'Access Developers discussion and problem solving'
Subject: RE: [AccessD] Q: using the host id to protect copyright in Access

Does anyone know of a way to retrieve the cpu serial number or the
motherboard serial number?  They must be retrievable since the motherboard
monitor programs report them.

John W. Colby
www.ColbyConsulting.com 

Contribute your unused CPU cycles to a good cause:
http://folding.stanford.edu/

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tom Hayes
Sent: Saturday, January 22, 2005 12:18 PM
To: accessd at databaseadvisors.com
Subject: [AccessD] Q: using the host id to protect copyright in Access


To introduce- My name is Tom Hayes - I run a small IT business in the west
of Ireland - Galway to be precise. Land of milk and guinness!

I build solutions using MS Access - I have been training and working with
the app. for six years. I want to prevent some of my generic solutions being
copied and used without my knowledge. 


The ideal solution for me is a way to identify the unique computer number (i
think this is reffered to as the host id) and set this as a constant in a
module in each individual database (mde). Each time the database is opened
the computers unique id will be referenced by the database and either open
or lock depending on comparison. 

Background: due to the nauture of the solution - I will configure each
database to each cpu and that is then delivered to site. If there is a
problem a complete new system ie hardware/ software is removed and returned.
There will be no ligitimate reason why the software should be used on a
different terminal.

I have used code in the past to retrieve Usernames into an access solution;
Option Compare Database Option Explicit

Declare Function GetUserName Lib "advapi32.dll" Alias _ "GetUserNameA"
(ByVal lpBuffer As String, nSize As Long) _ As Long

Public Function fntUsername() As String
Dim s As String
Dim cnt As Long
Dim dl As Long
Dim CurUser As String

cnt = 199
s = String$(200, 0)
dl = GetUserName(s, cnt)
If dl <> 0 Then CurUser = Left$(s, cnt) Else CurUser = "" fntUsername =
CurUser



End Function



Can you help or offer an alternative?

reagrds

Tom  

Business Development Manager
HayesMinton Ltd

-- 
___________________________________________________________
Sign-up for Ads Free at Mail.com http://promo.mail.com/adsfreejump.htm

-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



-- 
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list