Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need to find Wordpad.exe & extract path
Message
 
À
15/07/2002 00:19:59
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00678579
Message ID:
00678644
Vues:
11
>Hi,
>
>I need to find WORDPAD.EXE in the registry and extract the path from the appropriate registry value.
>
>Can anyone help with some code for this?
>
>Regards
Doug,

Simplest, using the registry class in the FFC, would be
SET CLASSLIB TO Registry.vcx ADDITIVE
oReg = CREATEOBJECT("Registry")
RELEASE CLASSLIB Registry
IF oReg.IsKey("wrifile")
  IF oReg.OpenKey("wrifile\Shell\Open\Command") = 0
    lcbuffer = SPACE(260)
    oReg.GetKeyValue("", @lcbuffer)
    oReg.CloseKey
  ENDIF 
ENDIF
oReg = NULL
lcbuffer will contain something like this: C:\Program Files\Windows NT\Accessories\WORDPAD.EXE "%1".
George

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

Click here to load this message in the networking platform