2013. február 20., szerda

Uninstall all Java in batch

I usually have Java 6, 7 and 8 installed on my (Windows) machines, but whenever an update comes out, I have to manually, one-by-one uninstall them from the control panel. For 64 bit systems, this is doubled. However, I found a command which can do this automatically and for multiple versions at the same time.

You only need to create a batch file with the following content, and run it as administrator:


wmic product where "name like 'Java(TM) 6%%'" call uninstall /nointeractive
wmic product where "name like 'Java(TM) SE%%'" call uninstall /nointeractive
wmic product where "name like 'Java 6%%'" call uninstall /nointeractive
wmic product where "name like 'Java 7%%'" call uninstall /nointeractive
wmic product where "name like 'Java 8%%'" call uninstall /nointeractive
wmic product where "name like 'Java SE%%'" call uninstall /nointeractive

Nincsenek megjegyzések:

Megjegyzés küldése