We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed331ea commit 808d459Copy full SHA for 808d459
softwareupdaterXL.bat
@@ -6,7 +6,12 @@ TITLE SW-Updater-Script
6
7
8
:install-java-8
9
-(for %%a IN (jre-8u*-windows-i586.exe) DO echo %%a && wmic product where "name like 'Java 8%%'" call uninstall && %%a /s && del %%a )
+if exist "%SYSTEMROOT%\System32\wbem\WMIC.exe" (
10
+ set UNINSTALL_COMMAND=wmic product where "name like 'Java 8%%'" call uninstall
11
+) else (
12
+ set UNINSTALL_COMMAND=powershell -Command "Get-CimInstance -ClassName Win32_Product -Filter \"Name LIKE 'Java 8%'\" | ForEach-Object { $_.Uninstall() }"
13
+)
14
+(for %%a IN (jre-8u*-windows-i586.exe) DO echo %%a && %UNINSTALL_COMMAND% && %%a /s && del %%a )
15
(for %%a IN (jre-8u*-windows-x64.exe) DO echo %%a && %%a /s && del %%a )
16
17
:install-7zip
0 commit comments