Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2007

Tip: Looking for answers? Try searching our database.

Java - Awareness of other programs installed on PC

Thread view: 
adeelmahmood - 13 Feb 2007 22:10 GMT
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
Andrew Thompson - 13 Feb 2007 22:38 GMT
> 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.
adeelmahmood - 13 Feb 2007 22:42 GMT
> > Is there way in JAVA to access information about the installed
> > programs on the PC. I mean somehow you could grab some information
[quoted text clipped - 3 lines]
>
> Andrew T.

well there are many possibilities .. thats not the point .. is it
possible and how ???
Brandon McCombs - 13 Feb 2007 23:29 GMT
>>> Is there way in JAVA to access information about the installed
>>> programs on the PC. I mean somehow you could grab some information
[quoted text clipped - 5 lines]
> 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
Andrew Thompson - 14 Feb 2007 08:36 GMT
..
> You'll have to forgive Andrew.

The OP can do anything they like.

Andrew T.
Chris Uppal - 14 Feb 2007 18:40 GMT
> 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
adeelmahmood - 14 Feb 2007 19:33 GMT
On Feb 14, 12:40 pm, "Chris Uppal" <chris.up...@metagnostic.REMOVE-
THIS.org> 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
[quoted text clipped - 15 lines]
>
>     -- 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 ..
Arne Vajhøj - 13 Feb 2007 23:56 GMT
> 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
Alex Hunsley - 14 Feb 2007 10:29 GMT
>> 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
[quoted text clipped - 5 lines]
> 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.)
Lew - 14 Feb 2007 20:12 GMT
> (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 - 15 Feb 2007 00:58 GMT
>> (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
Arne Vajhøj - 15 Feb 2007 00:00 GMT
>> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.