File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,12 @@ TITLE SW-Updater-Script
66
77
88: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 )
9+ if exist " %SYSTEMROOT% \System32\wbem\WMIC.exe" (
10+ set JAVA_UNINSTALL_COMMAND = wmic product where " name like 'Java 8%% '" call uninstall
11+ ) else (
12+ set JAVA_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 && %JAVA_UNINSTALL_COMMAND% && %%a /s && del %%a )
1015(for %%a IN (jre-8u*-windows-x64.exe) DO echo %%a && %%a /s && del %%a )
1116
1217:install-7zip
You can’t perform that action at this time.
0 commit comments