Using Google Earth from Shell


Licensed User
Hi everyone:

I'm trying to launch a .KML file using the Shell with this code:

Shell ("googleearth.exe","myfile.kml")

Google Earth launches, but I got the message:

"Unable to open Earth file\myfile.kml for read"

But if I open a cmd session, and type:
googleearth.exe myfile.kml

everything works fine. So, the kml file is Ok, and the way of launching it from the Desktop shell is also Ok. What am I doing wrong?

Any Idea of how can I do this?

By the way, I've seen Google Earth has a COM API Library. (

Is it possible to use it in our dear basic4ppc?



Licensed User

Hi Erel,

Yes, It was my fault...I wasn't using the quotes in the file path. It works fine just adding it. I mean:

Shell ("googleearth.exe",chr(34)& "myfile.kml"& chr(34))


Thanks for your time. (and software!)