Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Registry Class Problem
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00207999
Message ID:
00208010
Vues:
23
>Hi All:
>
>I have been working with the FFC Registry class using GetRegKey() and SetRegKey(). I can create a key and edit a key in an existing directory in the registry, but how do you create a new directory in the registry? I read somewhere that SetRegKey would create the directory if it doesn't exist, but it does not appear to be working.

What do you mean by directory? If you're talking about creating a new key (as opposed to a new key value), you can use the OpenKey method with the lCreateKey parameter (the third parameter) set to .T. - if you take a look at the code for the OpenKey method, you'll see that it uses RegCreateKey, which attempts to create a key if it doesn't exist when you try to open it (under NT, it could still fail based on user permissions in the registry, but the class isn't designed to let you know when security permissions are causing your trouble.)

>Any Ideas?
>
>Thanx,
>Charlie
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform