Terry,
You can use Getregkey method.
lcKey = "Software\CemMap"
lcRegPath = ""
lnRetCode = oRegistry.Getregkey(SearchPaths, @lcRegPath, lcKey, HKEY_CURRENT_USER)
IF lcRegPath <> _datam
A couple comments on your code
There is no need to use STORE command in every line
The lExists has logical value so IIF() is unnecessary. The Store IIF(lExists,.t.,.f.) TO _mapx is equivalent to _mapx = lExists
The variable name that starts with one '_' (underscore) are typicaly are VFP SYSTEM variables. It's not a good idea to name application variables this way.
>I am about ready to scream at this point. I have an application that works with another program & the two communicate via the Windows registry. To date my application has been checking if a registry key exists, loading strings into registry keys, etc... HOWEVER, I now have a need to evaluate the contents of a registry key and cannot seem to find the correct command/syntax. The key I'm evaluating is in the HKEY_LOCAL_MACHINE hive. Here's some of the code that exists currently:
>
> Store NEWOBJECT( "Registry" ,HOME()+ "FFC\Registry.vcx") to oRegistry
> #DEFINE HKEY_CURRENT_USER -2147483647
> #DEFINE HKEY_LOCAL_MACHINE -2147483646
>
> Store oRegistry.IsKey("Software\CemMap\",HKEY_LOCAL_MACHINE) to lExists
> Store IIF(lExists,.t.,.f.) TO _mapx
> IF _mapx
> Store oRegistry.IsKey("Software\MapInfo\MapX\5.0\",HKEY_LOCAL_MACHINE) to Exists
> IF lExists
> Store oRegistry.OpenKey("Software\CemMap\",HKEY_CURRENT_USER, .t. ) to nError
> IF nError = 0
> oRegistry.SetKeyValue( "SearchPaths" , _datam)
> ELSE
> =MESSAGEBOX("Registry Function Not Successful.")
> ENDIF
>etc etc
>
>How can I check/compare the contents of "Software\CemMap\SearchPaths",HKEY_CURRENT_USER?
--sb--