tags:

views:

259

answers:

4

I have a VB.NET app that generates KML to show within Google Earth. I simply do a Process.Start on the .KML file created. The problem is obviously "what if Google Earth isn't installed" and that's what I want to avoid.

Is there a way, in Windows, (not web) to determine if Google Earth is installed? If not, I'll prompt them that it's required, if so, I'll proceed with the process.

Thank you.

A: 

Check if %program files%/Google Earth folder exists.

lod3n
And what if the user specifies a non-standard installation path?
Tomas Lycken
A: 

See if you can find some registry entries that Google Earth creates upon installation (and removes when un-installed). If they exist, the program most likely does too. And the users are much less likely to tamper with the registry than with files or folders...

Tomas Lycken
+1  A: 

Check the registry for HKEY_CURRENT_USER\Software\Google\Google Earth Plus\ ...never done this myself but it seems logical.

Kolten
Agreed. You definitely want to look in the registry to see if it's installed. +1
Morinar
A: 

On install of your program, ask the user to navigate to the folder where the Google Earth .exe is located.

If they install Google Earth after your app and try to launch a KML file, then prompt the user to navigate to their Google Earth folder before you launch the KML. Don't require them to have Google Earth installed, though, as they may have another app associated with KMLs that they want to use.

RedFilter