Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Need to find Wordpad.exe & extract path
Message
From
15/07/2002 23:34:23
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00678579
Message ID:
00678948
Views:
14
Thanks for the help George.

Regards
Doug Johnston


>>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".
Previous
Reply
Map
View

Click here to load this message in the networking platform