Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need to find Wordpad.exe & extract path
Message
 
To
15/07/2002 00:19:59
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00678579
Message ID:
00678644
Views:
10
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform