Using Google Earth from Shell

Discussion in 'Questions (Windows Mobile)' started by jesb4ppc, Aug 22, 2007.

  1. jesb4ppc

    jesb4ppc Member 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?

  2. Erel

    Erel Administrator Staff Member Licensed User

    Does your file name include any spaces?
    Have you tried to use the full path in the Shell method?
  3. jesb4ppc

    jesb4ppc Member 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!)
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice