Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Registrde to
Message
From
26/09/2002 11:16:29
 
 
To
26/09/2002 11:02:41
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00704700
Message ID:
00704710
Views:
19
Silvio,
This routine uses the REGISTRY.PRG that comes with VFP (with some chages you could use the foundation class or even API calls):
* Program....: GET_SYSLICENSE.PRG
* Version....: 1.0
* Author.....: ** Richard G Bean **
* Date.......: April 2, 1999
* Compiler...: Visual FoxPro 05.00.00.0415 for Windows 

PARAMETERS p_cRegName, p_cRegCompany
LOCAL lcRegfile, oReg

STORE "" TO p_cRegName, p_cRegCompany

m.lcRegfile = "REGISTRY"
SET PROCEDURE TO (m.lcRegfile) ADDITIVE
oReg = CreateObject("Registry")

oReg.GetRegKey("DefName",@p_cRegName,;
		"Software\Microsoft\MS Setup (ACME)\User Info",oReg.nUserKey)
oReg.GetRegKey("DefCompany",@p_cRegCompany,;
		"Software\Microsoft\MS Setup (ACME)\User Info",oReg.nUserKey)
RELEASE PROC (m.lcRegfile)

IF EMPTY(p_cRegName)
   p_cRegName = "(Unknown)"
ENDIF && EMPTY(p_cRegName)
IF EMPTY(p_cRegCompany)
   p_cRegCompany = "(Unknown)"
ENDIF && EMPTY(p_cRegCompany)

RETURN .T.

*!* EOP: GET_SYSLICENSE.PRG
Rick

>Anyone knows a way of retrieving the registration name and company from Windows ?
>
>Silvio
Previous
Reply
Map
View

Click here to load this message in the networking platform