Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I find if MS office is installed and what versio
Message
 
 
À
09/12/2005 19:07:47
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 8 SP1
Database:
Visual FoxPro
Divers
Thread ID:
01076815
Message ID:
01076819
Vues:
18
This message has been marked as the solution to the initial question of the thread.
Bob,

I have Office 2003 on my PC and all 3 versions of OWC controls. Looks like there isn't one to one correspondence between them. Anyway, each OWC control has it's own CLSID so you can check for them in the registry. Here's a sample code for Chart control. I used WSH to read registry for simplicity. You can use your favorite method.
oShell = CreateObject("WScript.Shell")

lcOwcChart9  = "{0002E500-0000-0000-C000-000000000046}"
lcOwcChart10 = "{0002E546-0000-0000-C000-000000000046}"
lcOwcChart11 = "{0002E55D-0000-0000-C000-000000000046}"

lcChartVersions = ""

TRY
	oShell.RegRead("HKCR\CLSID\" + lcOwcChart9 + "\")
	lcChartVersions = lcChartVersions + ", 9"
CATCH	
ENDTRY		

TRY
	oShell.RegRead("HKCR\CLSID\" + lcOwcChart9 + "\")
	lcChartVersions = lcChartVersions + ", 10"
CATCH	
ENDTRY		

TRY
	oShell.RegRead("HKCR\CLSID\" + lcOwcChart9 + "\")
	lcChartVersions = lcChartVersions + ", 11"
CATCH	
ENDTRY		
? SUBSTR(lcChartVersions,3)
>I need help in finding the VFP 8 command that helps me verify if Microsoft Office is installed on a PC and what version of MS office installed.
>
>The reason I need this is to check If I use Office Web Components (OWC) for office 2000 / XP or OWC10 for office 2003
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform