Information générale
Catégorie:
Fonctions Windows API
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
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement