hi i am running digital and offset press here..
using a lot of macros in my regular life and maximum are purchased
is there any way my staff member can also use macros on office system but no one can able to copy or find orignal file of macro on it for themself because maximum are purchased and i dont want to share with them?
Basically do what Jeff said, but add some code to lock the macro to specific computer(s) by using the computer name, hard drive serial, CPU, etc. It could be copied then, but not used on computers that don't match your parameters.
can you show me a example how can i add my computer details in my code?
and what about the purchased macros? because maximum macros are purchased?
I don't code in VBA, so I'm not going to be a ton of help there and it's pretty broad question. There's a lot of different strategies on securing software and the best are always the ones you put your own spin on. How I monitor software use is by checking various details about a machine that are stored in a remote database and that's the only fairly secure way that I know of to regulate how many machines it can be used on for a specific user. You can't really hide the GMS or change file permissions on it and if you did then Corel wouldn't find it. Here's some code I found and then pasted it into vba and it worked. Probably not perfect. It's just checking the serial number of a hard drive. You can check for others things as well and would suggest you do so. What you want to check for is up to you. You then encrypt the data and store it on that machine. Verify that the encrypted data matches that of the machine you authorized in different places of your macro. If it doesn't match, don't run it.
Private Declare PtrSafe Function GetVolumeInformation _ Lib "kernel32" Alias "GetVolumeInformationA" _ (ByVal lpRootPathName As String, _ ByVal pVolumeNameBuffer As String, _ ByVal nVolumeNameSize As Long, _ lpVolumeSerialNumber As Long, _ lpMaximumComponentLength As Long, _ lpFileSystemFlags As Long, _ ByVal lpFileSystemNameBuffer As String, _ ByVal nFileSystemNameSize As Long) As LongPrivate Sub CommandButton1_Click() Dim Drive As String Drive = InputBox("Enter drive for checking SN") MsgBox Hex$(GetSerialNumber(Drive))End Sub
Public Function GetSerialNumber( _ ByVal sDrive As String) As Long
If Len(sDrive) Then If InStr(sDrive, "\\") = 1 Then ' Make sure we end in backslash for UNC If Right$(sDrive, 1) <> "\" Then sDrive = sDrive & "\" End If Else ' If not UNC, take first letter as drive sDrive = Left$(sDrive, 1) & ":\" End If Else ' Else just use current drive sDrive = vbNullString End If ' Grab S/N -- Most params can be NULL Call GetVolumeInformation( _ sDrive, vbNullString, 0, GetSerialNumber, _ ByVal 0&, ByVal 0&, vbNullString, 0)End Function