Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Read registry
Message
From
28/10/2010 10:21:36
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Read registry
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01487379
Message ID:
01487379
Views:
110
Hi,

I would like to check if a certain value in the Registry exsists

I found ( checked with regedit) that on this Win7 exists:

HKEY_LOCAL_MACHINE\SOFTWARE\Micosoft\Office\14.0\Registration

and

HKEY_LOCAL_MACHINE\SOFTWARE\Micosoft\Office\12.0

no Registration

Now with following code:
#INCLUDE REGISTRY.H
clea
loRegistry = NEWOBJECT( "registry", "registry.vcx")
? loRegistry.IsKey("SOFTWARE\Micosoft\Office\12.0\Registration", HKEY_LOCAL_MACHINE)
? loRegistry.IsKey("SOFTWARE\Micosoft\Office\14.0\Registration", HKEY_LOCAL_MACHINE)
I expect on the first line .F. on the second .T. alas they give both .F.

any clue to what I am doing wrong here?

Thanks for replying,

Koen

Read my blog: http://koenpiller.blogspot.com/
Next
Reply
Map
View

Click here to load this message in the networking platform