Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WSH Read Registry - How to read keys with \ in them
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00855157
Message ID:
00855812
Vues:
22
>>>
>>>Looks like WSH cannot read/write such keys. See PRB: Unable to Use a "\" in the Key Name with the RegWrite Method of Windows Script Host and http://dbforums.com/arch/196/2002/7/429739 for workarounds.
>>
>>Sergey,
>>
>>Thanks for the link. Still, I don't remain convinced that it's a problem with the WSH. The principal reason being that it's simply a COM wrapper for the necessary API calls. Further, since the OS must write and read this particular key (it's the network printer port), the API calls themselves must be able to accomplish this.
>>
>>My gut reaction is that it's a question of the proper format for the key. The closest analogy I can think of at the moment is long file names with spaces.
>
>George,
>
>In order to pass parameters to underlying API calls, WSH has to split Key Name parameter into Root Key, subkey and Value Name. The Root Key is the Key Name part before the first backslash. WSH wrongly assumes that subkey is everything between the first and last backslash. That's why it gets confused if there're backslashes in the Value Name.

Yep, I think you're right. I was able query the key using the standard registry functions.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform