Check for installed program on windows using Java? [duplicate]
开发者_如何学CPossible 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
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.
精彩评论