naxdestination.blogg.se

Java uninstall tool messed up my computer
Java uninstall tool messed up my computer






java uninstall tool messed up my computer

Edited Octoby ViciousXUSMCĪny of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. I think I can just add an $i = $i -1 or something in my If Statement so that I repeat that iteration if an uninstall is done.Įdit2: Fixed that was the issue it seems. The second instance of java may then fall into spot #100 in RegEnumKey() and get skipped as the next iteration of the loop would be 101/300

java uninstall tool messed up my computer

If I have two java uninstall strings right next to another and say I was in loop 100/300 and it gets uninstalled.

java uninstall tool messed up my computer

#RequireAdmin Uninstall Strings - HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall For $i = 1 to 300 $sKey1 = RegEnumKey ( "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\", $i ) If Then ExitLoop $sKey2 = RegRead ( "HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall\" & $sKey1, "DisplayName" ) If Then ContinueLoop If StringInStr($sKey2, "Java") Then MsgBox(0, "", $sKey2 & " Uninstall String Is" & & & $sKey1) If StringInStr ( $sKey2, "Java" ) Then Sleep ( 1000 ) RunWait ( & " /c MsiExec /X " & $sKey1 & " /qn", "C:", ) EndIf Next For $i = 1 to 300 $sKey1 = RegEnumKey ( "HKLM64\Software\Microsoft\Windows\CurrentVersion\Uninstall\", $i ) If Then ExitLoop $sKey2 = RegRead ( "HKLM64\Software\Microsoft\Windows\CurrentVersion\Uninstall\" & $sKey1, "DisplayName" ) If Then ContinueLoop If StringInStr($sKey2, "Java") Then MsgBox(0, "", $sKey2 & " Uninstall String Is" & & & $sKey1) If StringInStr ( $sKey2, "Java" ) Then Sleep ( 1000 ) RunWait ( & " /c MsiExec /X " & $sKey1 & " /qn", "C:", ) EndIf Next MsgBox ( 0, "", "Uninstall of All Java Versions Completed" )Įdit: Hmm I have an idea of what it might be. I'll post the source code I have so far and maybe somebody can see my error or offer up a better solution. I added a Sleep() incase it was a issue with running too fast (Like I ran into the other day with renaming files in a loop) but still the same.

java uninstall tool messed up my computer

So it is removing it, but question is why do I have to run it again. Installing 3 versions of Java on my computer for testing it seems to get 2 out of 3 and requires me to run the script again to get the 3rd. I started to work on the uninstall part and have one small issue. So I need to update Java on a lot of devices along with an application.








Java uninstall tool messed up my computer