Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Example Database Licence Agreement Ra Excel Discussion (Misc queries) 0 June 16th 09 12:51 PM
cell verification Firkins Excel Discussion (Misc queries) 2 October 2nd 07 05:40 PM
Licence help wanted NorwichH8R Excel Programming 4 April 24th 04 09:56 PM
Distribute Excel Workbook with licence? Mike MacSween Excel Programming 10 February 24th 04 03:01 PM
Do I Need Licence to Develop Excel Tools for Sale? Excel4Engineer Excel Programming 2 February 8th 04 07:46 PM


All times are GMT +1. The time now is 11:52 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"