MS Office Activation (1 Viewer)

Well I understand obtaining the password is pretty easy from 3rd party software, but good to have anyway, belts and braces.
As far as EverythingAccess is concerned, if there is enough copyright information and contact details on each part of the code, hopefully Wayne Philips would see that and ask the originators of the software first before pursuing any decoding. So all in all, placing the serial numbers in a module is at least one of the safest ways to ensure your code is relatively secure and people cannot simply pass on their purchase of a piece of software to anyone one for free use. After all, what would be the point of spending many months developing something.

Unfortunately no system of security can be 100% secure even for a MS Access db even though you can hide the code using an accde file. I'm surprised that Microsoft hasn't introduced such a feature in MS Excel.
Hi. Are you saying you have code to detect the MB serial number? Care to share it? Thanks.
 
Code:
Public Function MotherBoardSerialNumber() As String
'http://www.yogeshguptaonline.com/2009/07/hardware-locking-for-excel-workbook.html

    Dim objs As Object
    Dim obj As Object
    Dim WMI As Object
    Dim strAnswer As String
    
    Set WMI = GetObject("WinMgmts:")
    Set objs = WMI.InstancesOf("Win32_BaseBoard")
    
    For Each obj In objs
        strAnswer = strAnswer & obj.SerialNumber
        If strAnswer < objs.Count Then strAnswer = strAnswer & ","
    Next
    
    MotherBoardSerialNumber = strAnswer

End Function
 
This is all I get on my laptop?
Code:
? MotherBoardSerialNumber() 
Base Board Serial Number
 
I used the code on my laptop and I get 123490EN400015. Also tried it on a desktop and that gave CZC82064B.
 
Try this to see if you can get the serial number of your C drive.

Code:
Public Function GetDriveSerialNumber(strDriveName As String) As String
'strDriveSerialNumber = GetDriveSerialNumber("C:")

    Dim fso As Variant
    Dim f As Variant
    
    On Error GoTo ErrorHandler
    
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.GetDrive(strDriveName)
    
    GetDriveSerialNumber = f.SerialNumber
    
    Set f = Nothing
    Set fso = Nothing
    
ErrorHandler:
    If Err.Number <> 0 Then
        MsgBox "Error " & Err.Number & ": " & Err.Description, vbInformation
    End If
    
End Function
 
Yes, I have been able to get drives in the past from code that arnelgp supplied several times.?

Top is the D drive
Bottom is the C drive that I recently had to replace. :(
Code:
? GetDriveSerialNumber("D")
342522784
-2004187458
 
Obtaining the password of an MDB/MDE is trivial and there many free utilities available for this.
However the encryption in ACCDB/ACCDE files is MUCH stronger.
The only way of hacking those is using brute force and if the password is reasonably long/strong, that can take days before it succeeds.

As a test, I purchased a utility that retrieves ACCDB passwords and tested it on a file with a10 character password.
I left it running for 36 hours on a spare machine before giving up

NOTE
If anyone wants it, I also have code to to obtain the CPU serial number (as well as similar code to that above to get the M/B and hard drive numbers)
You can obtain just about anything using WMI code
 
Hmmm, can't understand why the MB Serial number didn't work. That is worrying as I was hoping to use this to identify machines where my software could be used. I may need to use a combination of the MB serial number and C Drive serial number to do what I want.
 
If anyone wants it, I also have code to to obtain the CPU serial number (as well as similar code to that above to get the M/B and hard drive numbers) You can obtain just about anything using WMI code

Yes please.

It would be nice if there was something in WMI code that would tell us if we have an activated MS Office which is part of what I wanted. This still eludes me. Please note, I am not interested in making an unactivated copy into an activated copy. Simply whether it's activated or not.
 
Hmmm, can't understand why the MB Serial number didn't work. That is worrying as I was hoping to use this to identify machines where my software could be used. I may need to use a combination of the MB serial number and C Drive serial number to do what I want.
Using software to determine hardware attributes could be unreliable. Some hard drives don't return a serial number when queried using code, but actually has one printed on the case. I imagine that's possible for mother boards as well. For that reason, I think "phoning home" to your own web server would be more reliable for checking valid licenses. Just my 2 cents...
 
Thanks theDBguy, it seems that your way is more fail safe. Pity, I was hoping to avoid using the web as I haven't dabbled with the web in anyway. But if that's the way to go, then so be it.
 
Thanks theDBguy, it seems that your way is more fail safe. Pity, I was hoping to avoid using the web as I haven't dabbled with the web in anyway. But if that's the way to go, then so be it.
It's not hard at all. Maybe you can even use a combination of the two.
 
For product activation purposes I use a combination of random characters from the CPU ID, M/B ID and hard drive number in conjunction with other information related to the program license key. It would be impossible to guess the activation key for the product

FWIW here are the three functions I use. Apologies if any are identical to code already supplied

NOTE Occasionally, the hardware may not return a value. In such cases, I use a default value to allow the activation algorithm to function correctly.

Code:
Public Function GetMBID() As String

    Dim WMI, MB, MBID

    Set WMI = GetObject("winmgmts:")

    For Each MB In WMI.InstancesOf("Win32_BaseBoard")
        MBID = MBID + MB.SerialNumber
    Next

End Function

'=============================================

Public Function GetCpuID() As String

    Dim WMI, cpu, CPUID

    Set WMI = GetObject("winmgmts:")

    For Each cpu In WMI.InstancesOf("Win32_Processor")
        CPUID = CPUID + cpu.ProcessorId
    Next

End Function

'=============================================

Function GetHdNum() As String

'note - this doesn't work on some hard drives

    Dim fsObj   As Object

    Dim drv     As Object

    Set fsObj = CreateObject("Scripting.FileSystemObject")

    Set drv = fsObj.Drives("C")

  'Use Hex to convert to string
    GetHdNum = Trim(Hex(drv.SerialNumber))
    
End Function
 
For the C drive serial number, when I use

Code:
Public Function GetDriveSerialNumber(strDriveName As String) As String
'strDriveSerialNumber = GetDriveSerialNumber("C:")

    Dim fso As Variant
    Dim f As Variant
   
    On Error GoTo ErrorHandler
   
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set f = fso.GetDrive(strDriveName)
   
    GetDriveSerialNumber = f.SerialNumber
   
    Set f = Nothing
    Set fso = Nothing
   
ErrorHandler:
    If Err.Number <> 0 Then
        DoCmd.RunMacro "mcrWarningsONHourGlassOFF"
        MsgBox "Error " & Err.Number & ": " & Err.Description, vbInformation, "basUtilities - GetDriveSerialNumber"
    End If
   
End Function
I get a different value to using GetHdNum()!

Just seen the Hex conversion. Please ignore post.
 
For that reason, I think "phoning home" to your own web server would be more reliable for checking valid licenses.

Could you clarify please.
 
Could you clarify please.
Basically, what I am saying is you have the licensing information on your server, and your Access app connects to it at startup. That way, you can control if the app starts or not, depending on the licensing data you maintain away from your clients' reach.
 
What's stopping the user from sharing the licensing data with others or would the server only allow one person to connect at a time with the same licensing data?
 
What's stopping the user from sharing the licensing data with others or would the server only allow one person to connect at a time with the same licensing data?
The user won't know the licensing information, only the software does. For example, when you activate your copy of Windows on one computer, you're not able to activate it again on another machine. It's the same idea.
 

Users who are viewing this thread

Back
Top Bottom