Java - Awareness of other programs installed on PC

Discussion in 'Java' started by adeelmahmood, Feb 13, 2007.

  1. adeelmahmood

    adeelmahmood Guest

    Is there way in JAVA to access information about the installed
    programs on the PC. I mean somehow you could grab some information
    about all items in (lets say for windows) the Start-Programs.
    Thanks for ur help
     
    adeelmahmood, Feb 13, 2007
    #1
    1. Advertising

  2. On Feb 14, 9:10 am, "adeelmahmood" <> wrote:
    > Is there way in JAVA to access information about the installed
    > programs on the PC. I mean somehow you could grab some information
    > about all items in (lets say for windows) the Start-Programs.


    Why? What does this program give to the end user?

    Andrew T.
     
    Andrew Thompson, Feb 13, 2007
    #2
    1. Advertising

  3. adeelmahmood

    adeelmahmood Guest

    On Feb 13, 4:38 pm, "Andrew Thompson" <> wrote:
    > On Feb 14, 9:10 am, "adeelmahmood" <> wrote:
    >
    > > Is there way in JAVA to access information about the installed
    > > programs on the PC. I mean somehow you could grab some information
    > > about all items in (lets say for windows) the Start-Programs.

    >
    > Why? What does this program give to the end user?
    >
    > Andrew T.


    well there are many possibilities .. thats not the point .. is it
    possible and how ???
     
    adeelmahmood, Feb 13, 2007
    #3
  4. adeelmahmood wrote:
    > On Feb 13, 4:38 pm, "Andrew Thompson" <> wrote:
    >> On Feb 14, 9:10 am, "adeelmahmood" <> wrote:
    >>
    >>> Is there way in JAVA to access information about the installed
    >>> programs on the PC. I mean somehow you could grab some information
    >>> about all items in (lets say for windows) the Start-Programs.

    >> Why? What does this program give to the end user?
    >>
    >> Andrew T.

    >
    > well there are many possibilities .. thats not the point .. is it
    > possible and how ???
    >


    You'll have to forgive Andrew. He seems to avoid answering questions
    asked by the poster and ask his own instead if he thinks his are more
    relevant. Your reasons don't matter to me but they seem to matter to
    him. Until it is determined that it matters to help you with your
    problem it's really none of my business *why* you want to do something.


    Anyway, in the specific case of Start menu entries, these entries are
    shortcuts that exist as files (like any other Windows shortcut) in a
    User's profile directory. Each user has a Start Menu folder that
    contains programs that were installed only for them (most apps are
    installed under the All Users profile). So you could just use Java to
    look at a user's start menu entries by looking at the Start Menu folder
    for that user. If you need anything else like accessing the Windows
    registry through Java I can't help you. I seem to recall looking for
    something like that a few weeks ago and I think I found some libraries
    that could do that but they weren't free.


    hope that helps
    Brandon
     
    Brandon McCombs, Feb 13, 2007
    #4
  5. adeelmahmood wrote:
    > Is there way in JAVA to access information about the installed
    > programs on the PC. I mean somehow you could grab some information
    > about all items in (lets say for windows) the Start-Programs.


    To access the Windows registry you will need JNI.

    You can find the items in the start menu by just
    listing files and directories, but if you need to
    read the content of the .lnk files I believe you are
    in unsupported land. There are probably some Win32 API
    to access the info and this will also require
    JNI.

    I think the bottom line is that Java is not a god
    choice for the task.

    Arne
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Feb 13, 2007
    #5
  6. On Feb 14, 10:29 am, Brandon McCombs <> wrote:
    > adeelmahmood wrote:

    ...
    > You'll have to forgive Andrew.


    The OP can do anything they like.

    Andrew T.
     
    Andrew Thompson, Feb 14, 2007
    #6
  7. adeelmahmood

    Alex Hunsley Guest

    Arne Vajhøj wrote:
    > adeelmahmood wrote:
    >> Is there way in JAVA to access information about the installed
    >> programs on the PC. I mean somehow you could grab some information
    >> about all items in (lets say for windows) the Start-Programs.

    >
    > To access the Windows registry you will need JNI.


    He could always use System.execute() with some native commands for
    accessing the registry etc. Doesn't sound very nice though.

    >
    > You can find the items in the start menu by just
    > listing files and directories, but if you need to
    > read the content of the .lnk files I believe you are
    > in unsupported land. There are probably some Win32 API
    > to access the info and this will also require
    > JNI.
    >
    > I think the bottom line is that Java is not a god
    > choice for the task.


    Agreed....
    (I had a giggle at 'god' choice btw! Started imaging Sun's other
    products, e.g. Sun Jehova.)
     
    Alex Hunsley, Feb 14, 2007
    #7
  8. adeelmahmood

    Chris Uppal Guest

    Brandon McCombs wrote:

    > Anyway, in the specific case of Start menu entries, these entries are
    > shortcuts that exist as files (like any other Windows shortcut) in a
    > User's profile directory.


    And elsewhere ('All users' as it's called on my Windows installation, though I
    imagine that name varies with language).

    And I wouldn't put it past MS to include "magic" entries in there too.

    But that (even when generalised) doesn't sound very useful to me. The nearest
    thing to a correct list of installed software in Windows is the one used by the
    "Add/Remove programs" application. But even that isn't really correct (I have
    many apps on this box which weren't "installed" in the normal sense -- Eclipse,
    for one).

    So, it really comes down to what the OP is /really/ trying to do. Which is
    what Andew asked.

    -- chris
     
    Chris Uppal, Feb 14, 2007
    #8
  9. adeelmahmood

    adeelmahmood Guest

    On Feb 14, 12:40 pm, "Chris Uppal" <-
    THIS.org> wrote:
    > Brandon McCombs wrote:
    > > Anyway, in the specific case of Start menu entries, these entries are
    > > shortcuts that exist as files (like any other Windows shortcut) in a
    > > User's profile directory.

    >
    > And elsewhere ('All users' as it's called on my Windows installation, though I
    > imagine that name varies with language).
    >
    > And I wouldn't put it past MS to include "magic" entries in there too.
    >
    > But that (even when generalised) doesn't sound very useful to me. The nearest
    > thing to a correct list of installed software in Windows is the one used by the
    > "Add/Remove programs" application. But even that isn't really correct (I have
    > many apps on this box which weren't "installed" in the normal sense -- Eclipse,
    > for one).
    >
    > So, it really comes down to what the OP is /really/ trying to do. Which is
    > what Andew asked.
    >
    > -- chris


    well Thank you guys for all ur help .. to clear up all this mess ..
    here is what I had in mind ..

    I was thinking along the lines of having a Java program automate the
    startup of other programs on ur PC ..using keywords .. kind of like
    launchy http://www.launchy.net/ .. difference is that launchy is
    written in C so it makes it a perfect candidate for windows stuff ..
    what launchy does is that indexes the start up programs for u to
    create a list of programs that u could start with some keyword
    matching mechanism ..

    I understand that for something like this java should not be the
    choice especially since it defeats the whole platform-independant-
    langauge concept. but I think this can be implemented in platform-
    independant manner so I guess I am just gonna drop the idea of
    indexing the Start menu or something like that ..

    the simplest thing would be to just let the user specify the
    executables and with the help of some pattern matching you can make it
    easier for user to get to that program .. but automating things is
    always better ..
    so if u have any ideas regarding this stuff .. please share

    Again thanks for your help ..
     
    adeelmahmood, Feb 14, 2007
    #9
  10. adeelmahmood

    Lew Guest

    Alex Hunsley wrote:
    > (I had a giggle at 'god' choice btw! Started imaging Sun's other
    > products, e.g. Sun Jehova.)


    It would run on the Jehova Virtuous Machine.

    - Lew
     
    Lew, Feb 14, 2007
    #10
  11. Alex Hunsley wrote:
    > Arne Vajhøj wrote:
    >> I think the bottom line is that Java is not a god
    >> choice for the task.

    >
    > Agreed....
    > (I had a giggle at 'god' choice btw! Started imaging Sun's other
    > products, e.g. Sun Jehova.)


    Absolutely unintentional. I just missed an 'o'.

    :)

    Arne
     
    =?ISO-8859-1?Q?Arne_Vajh=F8j?=, Feb 15, 2007
    #11
  12. adeelmahmood

    Alex Hunsley Guest

    Lew wrote:
    > Alex Hunsley wrote:
    >> (I had a giggle at 'god' choice btw! Started imaging Sun's other
    >> products, e.g. Sun Jehova.)

    >
    > It would run on the Jehova Virtuous Machine.


    :)

    >
    > - Lew
     
    Alex Hunsley, Feb 15, 2007
    #12
    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. MattB
    Replies:
    3
    Views:
    303
    Teemu Keiski
    Jan 22, 2004
  2. Martin M.
    Replies:
    4
    Views:
    344
    Simon Brunning
    Dec 15, 2005
  3. makarand
    Replies:
    0
    Views:
    483
    makarand
    Jul 7, 2008
  4. Mohamed Yousef
    Replies:
    0
    Views:
    217
    Mohamed Yousef
    Aug 23, 2008
  5. alex23
    Replies:
    3
    Views:
    250
    Fredrik Lundh
    Aug 24, 2008
Loading...

Share This Page