I need a script to silently and remotely uninstall all versions of java
Hi All,
I need a script to silently and remotely uninstall all versions of java. I Have tried google but can't find anything that works. Anyone have one to hand?
This is for Windows Xp 34\64 and Windows 7 32\64
Thanks,
D
I need a script to silently and remotely uninstall all versions of java. I Have tried google but can't find anything that works. Anyone have one to hand?
This is for Windows Xp 34\64 and Windows 7 32\64
Thanks,
D
Comments
-
the_Grinch Member Posts: 4,165 ■■■■■■■■■■Haven't used it, but found this?
Who hates Java? (how to remove all Java installations on your Network) | ivan's blogWIP:
PHP
Kotlin
Intro to Discrete Math
Programming Languages
Work stuff -
kgb Member Posts: 380Why all the hate?
We must love the JavaBachelor of Science, Information Technology (Software) - WGU -
ptilsen Member Posts: 2,835 ■■■■■■■■■■What tools are at your disposal? Group Policy? SCCM or a similar management tool? Or do you need to push it out to PCs on the network or named in a list another way, ie psexec or WMI?
I recently had to deploy specific versions of Java in SCCM, and I recall all the command-line arguments being documented on the web site. The scripting itself is fairly trivial. I do have a script or two that can be adapted for this purpose.
In a tightly controlled environment with no identified business need for Java, I can completely see blocking it. I consider Java to be easily a top 5 attack vector on workstations -- not #1 only because it is enabled by web browsers. In most environments, though, people need Java for some sites and web applications and disabling it is not feasible. -
D-boy Member Posts: 595 ■■□□□□□□□□Group Policy and LANDesk. Thank you for your replies! They have now decided not to remove the old version of Java.
-
Slowhand Mod Posts: 5,161 ModWell damn, and here I even wrote up a little PowerShell script for you:
$computers = Get-Content "C:\temp\computers.txt" ForEach-Object ( $computer in $computers ) { $java = Get-WmiObject -ComputerName $computer Win32_Product | WHERE { $_.name -like "J2SE Runtime Environment*" } $java.uninstall() }
Just toss the list of computers, one name on each line, in the computers.txt file and you're good to go. Ah well, maybe you can use it in the future.
Free Microsoft Training: Microsoft Learn
Free PowerShell Resources: Top PowerShell Blogs
Free DevOps/Azure Resources: Visual Studio Dev Essentials
Let it never be said that I didn't do the very least I could do.