Java - Awareness of other programs installed on PC

A

adeelmahmood

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
 
A

Andrew Thompson

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.
 
B

Brandon McCombs

adeelmahmood said:
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
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

adeelmahmood said:
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
 
A

Alex Hunsley

Arne said:
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.)
 
C

Chris Uppal

Brandon said:
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
 
A

adeelmahmood

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 ..
 
?

=?ISO-8859-1?Q?Arne_Vajh=F8j?=

Alex said:
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top