Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Licence Verification
I have built a module to ensure that my managers follow the correct
procedure for their risk assessment, now the company has shown an interest in my work, however I would like to limit the access to the program in the following manner if possible. During install I can input a string in LOCALMACHINE as a licence number I need to build a workbook called main.xls wich will run once after intall with a inputbox which will look into localmachine and read the string, after verification that the string matches it will rename itself as main.old and rename another file main2.xls as main.xls. if the string does not match a msgbox would prompt the user to contact me to obtain a installable version of the program with a valid licence. I hope this makes sence. thank you for your help. Alan |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Licence Verification
I thought we all did this for free? Actually I found this interesting and
would like to read any answers you get. Thanks "alanford" wrote: I have built a module to ensure that my managers follow the correct procedure for their risk assessment, now the company has shown an interest in my work, however I would like to limit the access to the program in the following manner if possible. During install I can input a string in LOCALMACHINE as a licence number I need to build a workbook called main.xls wich will run once after intall with a inputbox which will look into localmachine and read the string, after verification that the string matches it will rename itself as main.old and rename another file main2.xls as main.xls. if the string does not match a msgbox would prompt the user to contact me to obtain a installable version of the program with a valid licence. I hope this makes sence. thank you for your help. Alan |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Licence Verification
Don't know about all the pfaffing about with the main.xls, and not really
understanding how you would validate the licence value, but you could put this in the workbook open event (ThisWorkbook code module). It checks whether there is a licence key, so just change the registry key to suit. Private Sub Workbook_Open() Dim oWSH As Object Dim sResult Set oWSH = CreateObject("WScript.Shell") On Error Resume Next 'Read language registry key information sResult = oWSH.RegRead("HKLM\Software\Alan\myApp\Licence\") If Err.Number < 0 Or sResult = "" Then MsgBox "No valid licence" & vbCrLf & _ "Contact Alan for a valid version" Me.Close savechanges:=False End If Err.Clear On Error GoTo 0 End Sub -- HTH RP (remove nothere from the email address if mailing direct) "alanford" wrote in message oups.com... I have built a module to ensure that my managers follow the correct procedure for their risk assessment, now the company has shown an interest in my work, however I would like to limit the access to the program in the following manner if possible. During install I can input a string in LOCALMACHINE as a licence number I need to build a workbook called main.xls wich will run once after intall with a inputbox which will look into localmachine and read the string, after verification that the string matches it will rename itself as main.old and rename another file main2.xls as main.xls. if the string does not match a msgbox would prompt the user to contact me to obtain a installable version of the program with a valid licence. I hope this makes sence. thank you for your help. Alan |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Licence Verification
oWSH.RegRead
Interesting, first time I have seen this. Any reason why you prefer this above reading the registry with the Windows API? RBS "Bob Phillips" wrote in message ... Don't know about all the pfaffing about with the main.xls, and not really understanding how you would validate the licence value, but you could put this in the workbook open event (ThisWorkbook code module). It checks whether there is a licence key, so just change the registry key to suit. Private Sub Workbook_Open() Dim oWSH As Object Dim sResult Set oWSH = CreateObject("WScript.Shell") On Error Resume Next 'Read language registry key information sResult = oWSH.RegRead("HKLM\Software\Alan\myApp\Licence\") If Err.Number < 0 Or sResult = "" Then MsgBox "No valid licence" & vbCrLf & _ "Contact Alan for a valid version" Me.Close savechanges:=False End If Err.Clear On Error GoTo 0 End Sub -- HTH RP (remove nothere from the email address if mailing direct) "alanford" wrote in message oups.com... I have built a module to ensure that my managers follow the correct procedure for their risk assessment, now the company has shown an interest in my work, however I would like to limit the access to the program in the following manner if possible. During install I can input a string in LOCALMACHINE as a licence number I need to build a workbook called main.xls wich will run once after intall with a inputbox which will look into localmachine and read the string, after verification that the string matches it will rename itself as main.old and rename another file main2.xls as main.xls. if the string does not match a msgbox would prompt the user to contact me to obtain a installable version of the program with a valid licence. I hope this makes sence. thank you for your help. Alan |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Licence Verification
Brevity of code.
In my production stuff I use the APIs, in case there is a downer on installing WSH. -- HTH RP (remove nothere from the email address if mailing direct) "RB Smissaert" wrote in message ... oWSH.RegRead Interesting, first time I have seen this. Any reason why you prefer this above reading the registry with the Windows API? RBS "Bob Phillips" wrote in message ... Don't know about all the pfaffing about with the main.xls, and not really understanding how you would validate the licence value, but you could put this in the workbook open event (ThisWorkbook code module). It checks whether there is a licence key, so just change the registry key to suit. Private Sub Workbook_Open() Dim oWSH As Object Dim sResult Set oWSH = CreateObject("WScript.Shell") On Error Resume Next 'Read language registry key information sResult = oWSH.RegRead("HKLM\Software\Alan\myApp\Licence\") If Err.Number < 0 Or sResult = "" Then MsgBox "No valid licence" & vbCrLf & _ "Contact Alan for a valid version" Me.Close savechanges:=False End If Err.Clear On Error GoTo 0 End Sub -- HTH RP (remove nothere from the email address if mailing direct) "alanford" wrote in message oups.com... I have built a module to ensure that my managers follow the correct procedure for their risk assessment, now the company has shown an interest in my work, however I would like to limit the access to the program in the following manner if possible. During install I can input a string in LOCALMACHINE as a licence number I need to build a workbook called main.xls wich will run once after intall with a inputbox which will look into localmachine and read the string, after verification that the string matches it will rename itself as main.old and rename another file main2.xls as main.xls. if the string does not match a msgbox would prompt the user to contact me to obtain a installable version of the program with a valid licence. I hope this makes sence. thank you for your help. Alan |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Licence Verification
Thank you I have achieved what I set out to do, but only thank to you.
this is a breakthrough for me I'll never thank you enough. Brilliant. Alan |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Licence Verification
David
this is going to be for free as I have developed this for my company but I just want to avoid people copying my work and distributing it as theirs. Now that annoys me immensly. Alan |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Example Database Licence Agreement | Excel Discussion (Misc queries) | |||
cell verification | Excel Discussion (Misc queries) | |||
Licence help wanted | Excel Programming | |||
Distribute Excel Workbook with licence? | Excel Programming | |||
Do I Need Licence to Develop Excel Tools for Sale? | Excel Programming |