how to find the full path of powerpoint.exe?

Discussion in 'Java' started by csdev, Jul 13, 2004.

  1. csdev

    csdev Guest

    Hi All,

    I want to open power point application from java.
    To be able to do this I need the full path of powerpoint.exe

    How can I find this?

    Thanks,
    Cathy.
     
    csdev, Jul 13, 2004
    #1
    1. Advertising

  2. csdev

    Real Gagnon Guest

    > I want to open power point application from java.
    > To be able to do this I need the full path of powerpoint.exe
    >
    > How can I find this?


    You don't really need it, you can Runtime.getRuntime().exec(cmd) the
    following command to achieve this without the actual path of Powerpoint :

    String cmd = "rundll32 url.dll,FileProtocolHandler myfile.ppt";

    or

    //win9x
    String cmd = "start myfile.ppt";

    or

    //winnt or better
    String cmd = "cmd /c start myfile.ppt";

    Bye.
    --
    Real Gagnon from Quebec, Canada
    * Looking for Java or PB snippets ? Visit Real's How-to
    * http://www.rgagnon.com/howto.html
     
    Real Gagnon, Jul 13, 2004
    #2
    1. Advertising

  3. csdev

    csdev Guest

    Real Gagnon <realgagnon_@_yahooSpamIsBadSstripunderscore.com> wrote in message news:<Xns9524D717ABB34realhowtowwwrgagnonc@140.99.99.130>...
    > > I want to open power point application from java.
    > > To be able to do this I need the full path of powerpoint.exe
    > >
    > > How can I find this?

    >
    > You don't really need it, you can Runtime.getRuntime().exec(cmd) the
    > following command to achieve this without the actual path of Powerpoint :
    >
    > String cmd = "rundll32 url.dll,FileProtocolHandler myfile.ppt";
    >
    > or
    >
    > //win9x
    > String cmd = "start myfile.ppt";
    >
    > or
    >
    > //winnt or better
    > String cmd = "cmd /c start myfile.ppt";
    >
    > Bye.



    Real Gagnon,

    Thanks for your reply. I am actually trying to open a .htm file using
    power point. If I do the above a browser is activated.

    -Cathy.
     
    csdev, Jul 13, 2004
    #3
  4. On 13 Jul 2004 09:38:52 -0700, csdev wrote:

    >> //winnt or better
    >> String cmd = "cmd /c start myfile.ppt";

    ....
    > ..I am actually trying to open a .htm file using
    > power point. If I do the above a browser is activated.


    It would be more successful on my system than
    attempting to open a non-existent PowerPoint.

    But then.. why on Earth would you want to load
    an HTML file into PowerPoint in any case?

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
     
    Andrew Thompson, Jul 13, 2004
    #4
  5. csdev

    Liz Guest

    C:\Program Files\PowerPoint Viewer\PPVIEW32.EXE


    "Andrew Thompson" <> wrote in message
    news:...
    > On 13 Jul 2004 09:38:52 -0700, csdev wrote:
    >
    > >> //winnt or better
    > >> String cmd = "cmd /c start myfile.ppt";

    > ...
    > > ..I am actually trying to open a .htm file using
    > > power point. If I do the above a browser is activated.

    >
    > It would be more successful on my system than
    > attempting to open a non-existent PowerPoint.
    >
    > But then.. why on Earth would you want to load
    > an HTML file into PowerPoint in any case?
    >
    > --
    > Andrew Thompson
    > http://www.PhySci.org/ Open-source software suite
    > http://www.PhySci.org/codes/ Web & IT Help
    > http://www.1point1C.org/ Science & Technology
     
    Liz, Jul 14, 2004
    #5
  6. (csdev) writes:

    > To be able to do this I need the full path of powerpoint.exe
    >
    > How can I find this?


    Ask the user, then store that path in a configuration file.
     
    Tor Iver Wilhelmsen, Jul 14, 2004
    #6
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Samuel R. Neff
    Replies:
    2
    Views:
    608
    bradley
    Jun 10, 2005
  2. Replies:
    4
    Views:
    346
    Keith Thompson
    Jun 21, 2007
  3. Replies:
    7
    Views:
    480
  4. dude
    Replies:
    5
    Views:
    1,760
    Jussi Piitulainen
    Mar 17, 2011
  5. Replies:
    1
    Views:
    189
    Ken Bloom
    May 28, 2007
Loading...

Share This Page