Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Check to see if Word is installed
Message
From
25/11/2000 20:34:44
 
 
To
25/11/2000 13:15:36
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00445354
Message ID:
00445440
Views:
15
>>>>>>>>>>>>>>>>>
>Why not simply check the registry for the appropriate key?
>>>>>>>>>>>>>>>>>
>
>IMO, because some genius may have 'deleted' Word or somehow screwed it up w/o properly unistalling it, i.e. the existence of a registry key does not assure it will work.

By the same argument, being able to instantiate Word.Application isn't an absolute guarentee of functionality, either; I can think of (translates to: have seen people find) plenty of things that can screw up Word that won't appear when Word.Application first instances.

IAC, the time to check for a registry key's presense compared to the time for CREATEOBJ() or NEWOBJECT() to fail is miniscule, so it makes sense to me at least to check for the registry key before even attempting to instance the object.

I'd be more inclined to trust the registry information for Word 2K; the Windows Installer does a pretty outstanding job of protecting and restoring 'accidental' removals of some or all Word components, especailly under Windows 2000. I probably will need to check the registry for something; checking the registry can prepare you for other things like finding a different server for the RTF and DOC file extensions (eg. if Word isn't present, check to see who owns the Open action for these things.) Since the general work needed to get ready to check registry keys probably is useful even without the need to check for Word, and error handling needs to be set up whether Word.Application is creatable or not, having the code for both seems prudent.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform