Forum Discussion
oryxway
Sep 08, 2022Iron Contributor
Invoke WMIC within the Powershell command
Can I add/invoke a WMIC command within this to uninstall the older versions of Java also within the same Powershell script run it after this specific version is installed and if so how?
wmic product where "name like 'Java%%' and not name like 'Java 8 Update 341%%'" call uninstall /nointeractive|wmic && shutdown /a
Start-Process -Wait "\\networkpath\jre-8u341-windows-i586.exe" -ArgumentList '/s INSTALL_SILENT=1 STATIC=0 AUTO_UPDATE=0 WEB_JAVA=1 WEB_JAVA_SECURITY_LEVEL=H WEB_ANALYTICS=0 EULA=0 REBOOT=0 NOSTARTMENU=0 SPONSORS=0 /L*V "C:\JRE8Install1902_log.txt'
No RepliesBe the first to reply