I want to know if there is a way to uninstall a software programmatically using java.
Suppose if I have Firefox installed on my windows machine then how could I use java program to uninstall it.
Well, you could try and use Runtime.getRuntime().exec( ... )
and run the WMIC
command line tool.
For other platforms you could execute other command line programs (like aptitude
etc.).
You can try invoking Firefox's uninstall program, C:\\Program Files\\Mozilla Firefox\\uninstall\\helper.exe
, using ProcessBuilder
. For example:
Process p = new ProcessBuilder("C:\\Program Files\\Mozilla Firefox\\uninstall\\helper.exe").start();
You have to differenciate what you want to do:
At first ask yourself:
Now ask:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.