Is it possible to get a list of installed applications (like the list from the un-install programs) from a windows vista computer with java?
Not a Solution but a workaround!!
Getting windows native information using java SDK is not possible without support of external APIs. Instead of using external APIs (which is mostly LGPL licensed and not completely open), we can use the shell commands to get the same.
For getting the installed softwares list, use ProcessBuilder or Runtime.exec to run one of the following PowerShell commands:
Get-WmiObject -class Win32_Product | Select-Object -Property Name
- This is bit slower! It uses Win32_Product class. Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | Select-Object DisplayName, DisplayVersion, Publisher, InstallDate
- This is faster and can give additional details. This uses PS registry provider.You can stream the output of these and process it.
This is just a workaround and it is as per my analysis. As java is completely platform independent, fetching native information becomes difficult and the use of platform native tools (like command shell,, power shell etc.,) is a must.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With