Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Read registry
Message
De
28/10/2010 10:21:36
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
Read registry
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Divers
Thread ID:
01487379
Message ID:
01487379
Vues:
108
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/
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform