wood burning stoves 2.0*
The moose likes Swing / AWT / SWT and the fly likes finding all installed program in windows using java swing? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "finding all installed program in windows using java swing?" Watch "finding all installed program in windows using java swing?" New topic
Author

finding all installed program in windows using java swing?

Subrata Saha
Greenhorn

Joined: Jun 10, 2005
Posts: 19
It will great if some body has solved this problem finding all installed
program in windows box , it would be great to know.

--Subrata Saha
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> It will great...

it would also be great if posters responded whether answers were helpful or not - it's not a one-way street
Subrata Saha
Greenhorn

Joined: Jun 10, 2005
Posts: 19
I am still waiting for the answer
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19656
    
  18

Define "installed programs".
Do you mean something like Window's Add/Remove Programs? Then you'll have to go into the registry. Use Google to find libraries for accessing the registry and which registry keys to use.
Do you mean all executables found on a system? Then you can use File.listRoots() and File.listFiles() in recursion. Keep in mind that this will be a lengthy procedure; the Windows folder alone contains several thousands of files and easily one hundred sub folders. Program Files is usually of equal magnitude.

Either way, use a JList (single column) or JTable (multiple columns) to display the results.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Subrata Saha
Greenhorn

Joined: Jun 10, 2005
Posts: 19
Rob Prime wrote:Define "installed programs".
Do you mean something like Window's Add/Remove Programs? Then you'll have to go into the registry. Use Google to find libraries for accessing the registry and which registry keys to use.


Yeah i want to find out if some has the library for finding all the display name for installed programs from the registry.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19656
    
  18

java Windows registry. Enjoy.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: finding all installed program in windows using java swing?
 
Similar Threads
What is the best linux distro to use for a programmer...
installing Netbeans
Reg ex help desired; should be simple, but...
unable to find servlet.jar
read list of installed softwares in linux using java program