how to use Dispatch to open an application in win32com.client

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • vithi

    #1

    how to use Dispatch to open an application in win32com.client

    Hi'
    I am trying to launch an application. When I try like that
    When I try like that Excel is opening
    import win32com.client
    object = win32com.client .Dispatch("Exce l.Application")
    object.Visible = 1

    But when I try my application which is QeepIt.exe
    which is in the c:\ drive it is not running
    Any body tell me how to give path to open an exectable application in
    Dispatch modules
    I try like that
    object = win32com.client .Dispatch("c:\F older\QeepIt.ex e")
    It give an error.

  • Gabriel Genellina

    #2
    Re: how to use Dispatch to open an application in win32com.client

    En Fri, 16 Feb 2007 23:36:26 -0300, vithi <vithi99@hotmai l.comescribió:
    I am trying to launch an application. When I try like that
    When I try like that Excel is opening
    import win32com.client
    object = win32com.client .Dispatch("Exce l.Application")
    object.Visible = 1
    >
    But when I try my application which is QeepIt.exe
    which is in the c:\ drive it is not running
    Any body tell me how to give path to open an exectable application in
    Dispatch modules
    I try like that
    object = win32com.client .Dispatch("c:\F older\QeepIt.ex e")
    It give an error.
    The above code is used to launch a COM server registered under the name
    "Excel.Applicat ion" and then control it. If you don't know what a COM
    server is, surely your application can't be used this way.

    For launching another program, perhaps sending it some text, and capturing
    its output, look at the subprocess module. If you are only interested in
    executing it, with no additional communication, os.system() may be enough.

    --
    Gabriel Genellina

    Comment

    • Gabriel Genellina

      #3
      Re: how to use Dispatch to open an application in win32com.client

      En Fri, 16 Feb 2007 23:36:26 -0300, vithi <vithi99@hotmai l.comescribió:
      I am trying to launch an application. When I try like that
      When I try like that Excel is opening
      import win32com.client
      object = win32com.client .Dispatch("Exce l.Application")
      object.Visible = 1
      >
      But when I try my application which is QeepIt.exe
      which is in the c:\ drive it is not running
      Any body tell me how to give path to open an exectable application in
      Dispatch modules
      I try like that
      object = win32com.client .Dispatch("c:\F older\QeepIt.ex e")
      It give an error.
      The above code is used to launch a COM server registered under the name
      "Excel.Applicat ion" and then control it. If you don't know what a COM
      server is, surely your application can't be used this way.

      For launching another program, perhaps sending it some text, and capturing
      its output, look at the subprocess module. If you are only interested in
      executing it, with no additional communication, os.system() may be enough.

      --
      Gabriel Genellina

      Comment

      • vithi

        #4
        Re: how to use Dispatch to open an application in win32com.client

        Hi
        Since I haven't see any help or tutorial on com there is a application
        is installed in the server I am login to the server then what code do
        I have to implement to launch the application registered in a server.
        how do I write a code to tell my computer to go in to the perticular
        server and launch program "XYZ "

        do you think this code alone enough to go and look for xyz
        application in the server, I don't get it
        Give me any sample code or more help. It help me a lot.
        object = win32com.client .Dispatch("xyz. Application")


        On Feb 16, 11:56 pm, "Gabriel Genellina" <gagsl...@yahoo .com.ar>
        wrote:
        En Fri, 16 Feb 2007 23:36:26 -0300, vithi <vith...@hotmai l.comescribió:
        >
        I am trying to launch an application. When I try like that
        When I try like that Excel is opening
        import win32com.client
        object = win32com.client .Dispatch("Exce l.Application")
        object.Visible = 1
        >
        But when I try my application which is QeepIt.exe
        which is in the c:\ drive it is not running
        Any body tell me how to give path to open an exectable application in
        Dispatch modules
        I try like that
        object = win32com.client .Dispatch("c:\F older\QeepIt.ex e")
        It give an error.
        >
        The above code is used to launch a COM server registered under the name
        "Excel.Applicat ion" and then control it. If you don't know what a COM
        server is, surely your application can't be used this way.
        >
        For launching another program, perhaps sending it some text, and capturing
        its output, look at the subprocess module. If you are only interested in
        executing it, with no additional communication, os.system() may be enough.
        >
        --
        Gabriel Genellina

        Comment

        • Gabriel Genellina

          #5
          Re: how to use Dispatch to open an application in win32com.client

          En Sat, 17 Feb 2007 17:47:23 -0300, vithi <vithi99@hotmai l.comescribió:
          Hi
          Since I haven't see any help or tutorial on com there is a application
          is installed in the server I am login to the server then what code do
          I have to implement to launch the application registered in a server.
          how do I write a code to tell my computer to go in to the perticular
          server and launch program "XYZ "
          Try to explain a bit better what do you want to do.
          What is "the server"?
          Do you want to open and execute a program on "another" computer?
          Or is it on the "same" computer?
          do you think this code alone enough to go and look for xyz
          application in the server, I don't get it
          Give me any sample code or more help. It help me a lot.
          object = win32com.client .Dispatch("xyz. Application")
          Does the manual for "xyz" say that it is a COM application?
          Did someone told you that "xyz" works that way?
          Did you find "xyz" actually registered as a COM application?
          If not, forget about that line, won't work at all.

          --
          Gabriel Genellina

          Comment

          Working...