Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Get path from system registry to run Excel
Message
From
13/08/1998 10:03:26
 
 
To
13/08/1998 09:12:44
General information
Forum:
Visual FoxPro
Category:
The Mere Mortals Framework
Miscellaneous
Thread ID:
00126459
Message ID:
00126494
Views:
22
>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
Map
View

Click here to load this message in the networking platform