开发者

Check for installed program on windows using Java? [duplicate]

开发者 https://www.devze.com 2023-03-23 08:46 出处:网络
This question already has answers here: Closed 11 years ago. 开发者_如何学CPossible Duplicate: How to check if a program is installed on system
This question already has answers here: Closed 11 years ago.

开发者_如何学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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号