Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Win API to cofigure Application to use with an extensio
Message
From
25/12/2000 17:21:59
Peter Wagner
Point Informática Ltda.
Limeira, Brazil
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00456533
Message ID:
00456762
Views:
24
Thanks for the help, but I tried manually to
do the same in the Registry, but something
didnt work as expected.
Look:
Wanted to search for file extension .RTF

I Retrieved the default Value in the
HKEY_CLASSES_ROOT hive.
I this case: "Word.RTF.8"

Executed a Search for "Word.RTF.8"
I got this value in HKEY_CLASSES_ROOT\Word.RTF.8\shell\open\command:
"C:\Arquivos de programas\Microsoft Office\Office\Winword.exe" /n

Changed the value to this:
"C:\ARQUIV~1\ACESSÓ~1\WORDPAD.EXE "%1""

I closed Registry, started Windows again
opened VFP in command window typed:

ox= CREATEOBJECT("WSCRIPT.SHELL")
ox.run("c:\TEST1.RTF",1,.F.)

This opened Wordpad with the correct file but got this error message in VFP:

OLE error code 0X80070002: The sistem couldnt find the specified file

What im missing here ?
I got the value that was changed in:
HKEY_CLASSES_ROOT\Wordpad.Document.1\shell\open\command

I never worked with Registry and I dont feel safe working with registry.

PS:I looked at Solution and saw a sample in
Get Application Information from the Windows Registry,
but I havent found a sample to change the information in the Windows Registry

Where could I find a lite sample to do this with VFP ??

Thanks in advance
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform