I can’t tell you how many times I have logged in to a computer just to see five or more versions of Java installed going back multiple versions. To uninstall ALL of them in one fell swoop without being prompted, I use this command:
wmic product where "name like 'Java%%'" call uninstall /nointeractive
I recently got stuck trying to remove a printer from a computer with the error “Access is Denied, Unable to Remove Device”. Here is how I fixed it:
First, stop the print spooler by opening an elevated command prompt and entering “net stop spooler” and press enter. Leave the window open.
Then head into the registry to: HKEY_CURRENT_USER\Printers\Connections and delete the offending printer
Next, go back to the command prompt and enter “net start spooler” and press enter.
That should do it!