3

Possible Duplicate:
How to check if a program is installed on system

I need to check whether a specific program is installed or not on my system. For example, my program needs to check whether FireFox is installed in my system. If a program is installed , then i want to find the installation directory of that specific program.

I found this but this is not in java. I read this but still i am unable to solve this

Community
  • 1
  • 1
Asghar
  • 2,336
  • 8
  • 46
  • 79
  • 1
    What problems are you having with the solutions provided? You'll have to read the windows registry to do what you want, and the solutions you linked to do exactly that. – Starkey Jul 28 '11 at 14:52
  • 1
    `i read this but still i am unable to solve this` - what did you try and where did you fail? If you do not clarify - then your question is an exact duplicate. – bezmax Jul 28 '11 at 14:52
  • 1
    Question #2439984 answers your question. What about the answer there don't you like? – Adam Batkin Jul 28 '11 at 14:53
  • 1
    what dont you understand from the previous question? installed software is queried from registry – Leon Jul 28 '11 at 14:53
  • yeh a possible duplicate, Thanks Problem solved. using Jregistrykey – Asghar Jul 28 '11 at 15:04

1 Answers1

4

Every software (say Firefox) creates it's entry under the path

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall

Firefox also creates it under the same path. In my machine

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\Mozilla Firefox5.0.1(x86 en-US)

is path for that.

Existance of this path confirms that firefox is installed on machine. For the installation directory, read the value of key named 'InstallLocation' under above mentioned path for Firefox.

santosh-patil
  • 1,540
  • 1
  • 15
  • 29