General information
Category:
The Mere Mortals Framework
>I'd like to retrieve the path name for where Excel lives on all computer on which my app runs. I plan to run (/n) excel from VFP but the path might change from PC to PC. How do I pass the parameters to the CREGISTRY object?
Just did this very thing yesterday. Sort of.
Rick Strahl has a registry class on his web-site that you can use to call the registry. It's easy to follow, nothing too complex.
I set it up as functions instead of methods in a class. My code to find the EXE looks like this.
local lcExecutable
lcExecutable = ReadRegistryString(HKEY_CLASSES_ROOT,;
"htmlfile\shell\open\command",;
"")
lcExecutable = subs(lcExecutable,2,at('"',lcExecutable,2)-2)
if file(lcExecutable)
this.iexplore = .t.
endif
I'm checking to see if IE is installed and exists before I allow my users to call it.
Use REGEDIT to find where the path to Excel.exe is stored. This might work:
lcExecutable = ReadRegistryString(HKEY_CLASSES_ROOT,;
"ExcelWorksheet\protocol\StdFileEditing\server",;
"")
Good luck.
paul
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only