Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

finding all installed program in windows using java swing?

 
Subrata Saha
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
> 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
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am still waiting for the answer
 
Rob Spoor
Sheriff
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Subrata Saha
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 20495
54
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java Windows registry. Enjoy.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic