Deploying Java can be a real pain! While using this Java Deployment Guide, we recently ran into an issue where an updated version of Java would not install through Group Policy. What we needed was an automated way to uninstall Java regardless of the version.
A quick search of Google turned up numerous results with the same issue. We found that we were able to correct the issue with JavaRa when ran manually. To have three people download and run JavaRa on 1500 workstations was out of the question though. I knew there had to be a way to fix it and I was fortunate enough to find a script which automated the removal process for any Java version. The script can be found at the very bottom of this article.
This script solved the problem of getting the old version of Java off of the computer. Because the policy had already applied though, machines were still not installing the new version of Java. That was quickly remedied by adding the following line onto the batch file.
“\\server\software\jre1.7.0_25\jre1.7.0_25.msi” /passive /norestart
As a note, you can also remove the stuck Application GPO by using the tool MSIManger. That tool can be found under the Active Directory/Group Policy section on this page.
This left one final obstacle, how do I get this file to run on the computers that need it without the necessity of my staff going around to log in to each one individually? We decided to use a startup script that we distributed to all of our computers. This also meant we had to add one final line to the startup script so the machine would automatically reboot once the java install was complete.
shutdown /r /t 0
We have since deployed Java 7 Update 40 and haven’t had any additional errors.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 |
:: Sun / Oracle Java Runtime Environment (JRE) Uninstallation Script :: Created by C:Amie http://camie.dyndns.org/ REM JRE Runtime Environment 7.0 Update 25 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217025FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 25 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417025FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 9 REM JRE Runtime Environment 7.0 Update 24 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217024FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 24 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417024FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 9 REM JRE Runtime Environment 7.0 Update 23 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217023FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 23 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417023FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 9 REM JRE Runtime Environment 7.0 Update 22 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217022FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 22 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417022FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 9 REM JRE Runtime Environment 7.0 Update 21 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217021FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 21 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417021FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 9 REM JRE Runtime Environment 7.0 Update 20 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217020FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 20 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417020FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 9 REM JRE Runtime Environment 7.0 Update 19 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217019FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 19 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417019FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 9 REM JRE Runtime Environment 7.0 Update 18 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217018FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 18 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417018FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 9 REM JRE Runtime Environment 7.0 Update 17 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217017FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 17 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417017FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 9 REM JRE Runtime Environment 7.0 Update 16 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217016FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 16 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417016FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 9 REM JRE Runtime Environment 7.0 Update 15 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217015FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 15 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417015FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 9 REM JRE Runtime Environment 7.0 Update 14 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217014FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 14 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417014FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 9 REM JRE Runtime Environment 7.0 Update 13 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217013FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 13 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417013FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 9 REM JRE Runtime Environment 7.0 Update 12 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217012FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 12 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417012FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 9 REM JRE Runtime Environment 7.0 Update 11 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217011FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 11 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417011FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 9 REM JRE Runtime Environment 7.0 Update 10 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217010FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 10 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417010FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 9 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217009FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 9 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417009FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 8 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217008FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 8 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417008FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 7 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217007FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 7 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417007FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 6 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417006FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 6 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217006FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 5 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417005FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 5 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217005FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 4 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417004FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 4 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217004FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 3 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417003FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 3 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217003FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 2 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417002FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 2 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217002FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 1 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417001FF} /passive /norestart REM JRE Runtime Environment 7.0 Update 1 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217001FF} /passive /norestart REM JRE Runtime Environment 7.0 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86417000FF} /passive /norestart REM JRE Runtime Environment 7.0 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83217000FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 51 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416051FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 51 (x86) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216051FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 45 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416045FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 45 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216045FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 44 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416044FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 44 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216044FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 43 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416043FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 43 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216043FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 42 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416042FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 42 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216042FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 41 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416041FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 41 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216041FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 40 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416040FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 40 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216040FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 39 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416039FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 39 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216039FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 38 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416038FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 38 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216038FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 37 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416037FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 37 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216037FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 36 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416036FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 36 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216036FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 35 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416035FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 35 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216035FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 34 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416034FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 34 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216034FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 33 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416033FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 33 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216033FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 32 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416032FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 32 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216032FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 31 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416031FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 31 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216031FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 30 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416030FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 30 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216030FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 29 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416029FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 29 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216029FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 28 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416028FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 28 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216028FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 27 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416027FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 27 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216027FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 26 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416026FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 26 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216026FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 25 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416025FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 25 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216025FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 24 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416024FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 24 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216024FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 23 (x64) MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F86416023FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 23 MsiExec.exe /uninstall {26A24AE4-039D-4CA4-87B4-2F83216023FF} /passive /norestart REM JRE Runtime Environment 6.0 Update 22 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160220} /passive /norestart REM JRE Runtime Environment 6.0 Update 21 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160210} /passive /norestart REM JRE Runtime Environment 6.0 Update 20 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160200} /passive /norestart REM JRE Runtime Environment 6.0 Update 19 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160190} /passive /norestart REM JRE Runtime Environment 6.0 Update 18 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160180} /passive /norestart REM JRE Runtime Environment 6.0 Update 17 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160170} /passive /norestart REM JRE Runtime Environment 6.0 Update 16 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160160} /passive /norestart REM JRE Runtime Environment 6.0 Update 15 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160150} /passive /norestart REM JRE Runtime Environment 6.0 Update 14 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160140} /passive /norestart REM JRE Runtime Environment 6.0 Update 13 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160130} /passive /norestart REM JRE Runtime Environment 6.0 Update 12 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160120} /passive /norestart REM JRE Runtime Environment 6.0 Update 11 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160110} /passive /norestart REM JRE Runtime Environment 6.0 Update 10 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160100} /passive /norestart REM JRE Runtime Environment 6.0 Update 9 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160090} /passive /norestart REM JRE Runtime Environment 6.0 Update 8 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160080} /passive /norestart REM JRE Runtime Environment 6.0 Update 7 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160070} /passive /norestart REM JRE Runtime Environment 6.0 Update 6 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160060} /passive /norestart REM JRE Runtime Environment 6.0 Update 5 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160050} /passive /norestart REM JRE Runtime Environment 6.0 Update 4 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160040} /passive /norestart REM JRE Runtime Environment 6.0 Update 3 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160030} /passive /norestart REM JRE Runtime Environment 6.0 Update 2 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160020} /passive /norestart REM JRE Runtime Environment 6.0 Update 1 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160010} /passive /norestart REM JRE Runtime Environment 6.0 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0160000} /passive /norestart REM JRE Runtime Environment 5.0 Update 23 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150230} /passive /norestart REM JRE Runtime Environment 5.0 Update 22 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150220} /passive /norestart REM JRE Runtime Environment 5.0 Update 21 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150210} /passive /norestart REM JRE Runtime Environment 5.0 Update 20 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150200} /passive /norestart REM JRE Runtime Environment 5.0 Update 19 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150190} /passive /norestart REM JRE Runtime Environment 5.0 Update 18 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150180} /passive /norestart REM JRE Runtime Environment 5.0 Update 17 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150170} /passive /norestart REM JRE Runtime Environment 5.0 Update 16 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150160} /passive /norestart REM JRE Runtime Environment 5.0 Update 15 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150150} /passive /norestart REM JRE Runtime Environment 5.0 Update 14 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150140} /passive /norestart REM JRE Runtime Environment 5.0 Update 13 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150130} /passive /norestart REM JRE Runtime Environment 5.0 Update 12 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150120} /passive /norestart REM JRE Runtime Environment 5.0 Update 11 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150110} /passive /norestart REM JRE Runtime Environment 5.0 Update 10 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150100} /passive /norestart REM JRE Runtime Environment 5.0 Update 9 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150090} /passive /norestart REM JRE Runtime Environment 5.0 Update 8 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150080} /passive /norestart REM JRE Runtime Environment 5.0 Update 7 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150070} /passive /norestart REM JRE Runtime Environment 5.0 Update 6 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150060} /passive /norestart REM JRE Runtime Environment 5.0 Update 5 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150050} /passive /norestart REM JRE Runtime Environment 5.0 Update 4 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150040} /passive /norestart REM JRE Runtime Environment 5.0 Update 3 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150030} /passive /norestart REM JRE Runtime Environment 5.0 Update 2 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150020} /passive /norestart REM JRE Runtime Environment 5.0 Update 1 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150010} /passive /norestart REM JRE Runtime Environment 5.0 MsiExec.exe /uninstall {3248F0A8-6813-11D6-A77B-00B0D0150000} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_19 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142190} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_18 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142180} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_17 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142170} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_16 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142160} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_15 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142150} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_14 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142140} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_13 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142130} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_12 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142120} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_11 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142110} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_10 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142100} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_09 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142090} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_08 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142080} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_07 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142070} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_06 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142060} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_05 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142050} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_04 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142040} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_03 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142030} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_02 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142020} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2_01 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142010} /passive /norestart REM Java 2 Runtime Environment, SE v1.4.2 MsiExec.exe /uninstall {7148F0A8-6813-11D6-A77B-00B0D0142000} /passive /norestart REM Java 2 Runtime Environment Standard Edition v1.3.1_25 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_25\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_24br> %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_24\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_23 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_23\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_22 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_22\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_21 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_21\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_20 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_20\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_19 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_19\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_18 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_18\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_17 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_17\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_16 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_16\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_15 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_15\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_14 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_14\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_13 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_13\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_12 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_12\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_11 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_11\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_10 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_10\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_09 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_09\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_08 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_08\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_07 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_07\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_06 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_06\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_05 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_05\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_04 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_04\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_03 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_03\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_02 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_02\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3.1_01 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3.1_01\Uninst.isu" -a REM Java 2 Runtime Environment Standard Edition v1.3 %systemroot%\IsUninst.exe -f"%SystemDrive%\Program Files\JavaSoft\JRE\1.3\Uninst.isu" –a |
OMG guys, you use the hardest way with so many strings of code.
I’am used this code when upgrading Java over my 350 workstations, it’s easy to understand, simple and universal for any version of java, you dont need kilometers of uniq install ID’s
it works on computer shutdown or reboot, deletes ony version of java, writedown to log and on computer startup installs a latest version by GPO. and it has a foolproof mechanism, if script find log file it exits prevents deleting new version. script calls deletion of every version twice because some of my users have installed two versions of java( i know it’s sounds crazy 🙂 )
here the script:
if not exist c:\logs mkdir c:\logs
set log=c:\logs\java_uninstall.log
if exist %log% exit
taskkill /F /IM iexplorer.exe >> %log%
taskkill /F /IM iexplore.exe >> %log%
taskkill /F /IM firefox.exe >> %log%
taskkill /F /IM opera.exe >> %log%
taskkill /F /IM chrome.exe >> %log%
taskkill /F /IM jusched.exe >> %log%
taskkill /F /IM jp2launcher.exe >> %log%
taskkill /F /IM java.exe >> %log%
taskkill /F /IM javaw.exe >> %log%
taskkill /F /IM jqs.exe >> %log%
wmic product where “name like ‘Java 6%%'” call uninstall /nointeractive >> %log%
wmic product where “name like ‘Java 6%%'” call uninstall /nointeractive >> %log%
wmic product where “name like ‘Java 7%%'” call uninstall /nointeractive >> %log%
wmic product where “name like ‘Java 7%%'” call uninstall /nointeractive >> %log%
wmic product where “name like ‘Java 8%%'” call uninstall /nointeractive >> %log%
wmic product where “name like ‘Java 8%%'” call uninstall /nointeractive >> %log%
wmic product where “name like ‘Java(TM) 6%%'” call uninstall /nointeractive >> %log%
wmic product where “name like ‘Java(TM) 6%%'” call uninstall /nointeractive >> %log%
wmic product where “name like ‘Java(TM) 7%%'” call uninstall /nointeractive >> %log%
wmic product where “name like ‘Java(TM) 7%%'” call uninstall /nointeractive >> %log%
wmic product where “name like ‘Java(TM) 8%%'” call uninstall /nointeractive >> %log%
wmic product where “name like ‘Java(TM) 8%%'” call uninstall /nointeractive >> %log%
wmic product where “name like ‘J2SE Runtime Environment%%'” call uninstall /nointeractive >> %log%
wmic product where “name like ‘J2SE Runtime Environment%%'” call uninstall /nointeractive >> %log%
Nice method Vyacheslav!
I know this post is a bit old but I do have an issue. This is great if you are going to restart all of your computers immediately after the install. Problem I see is, if you need to leave this policy intact for any length of time, every time your computers boot up, the installer would run again and again. Am I missing something?
You could handle this a few ways. First, you could modify the script to create a text file in the root of C when it is finished. You could then use an if statement to check for that file.
You could also use Group Policy Preferences to deploy a registry edit. The registry edit would add this script to the run once startup list and would be set to apply once.
Hey Alan, Thanks for sharing this.
Just wanted to say thanks to Kyle Beckman (http://trekker.net) for sending me the Java 6 Update 51 GUIDs. They have been added to the script above.
No problemo!
ftp://ftp.snsconstructions.com/MSIManager.exe dead link
Odd that my link checker didn’t catch that! I replaced the link on the tools page with a link that works. Let me know if you have any other issues.
http://deployhappiness.com/resources/tool-downloads/
You could probably shorten and future-proof the script a bit using something like this
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall | findstr 26A24AE4-039D-4CA4-87B4-2F832170 >> “%temp%\dynamic.txt”
reg query HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall | findstr 26A24AE4-039D-4CA4-87B4-2F864170 >> “%temp%\dynamic.txt”
for /f “delims=” %%a in (“%temp%\dynamic.txt”) do MsiExec.exe /uninstall %%a /passive /norestart
Now I didn’t add all the guids because I’m lazy atm but they seem to follow a set pattern and match up to the last few characters so this should work reliably.
Good idea!!
Hi Joseph, here’s the vbs script that I use to uninstall any JRE 7 version before proceding with the installation part. Hope it helps someone.
x64 installation on 64 bits or x86 installation on a 32 bits system:
On Error Resume Next
Dim strSearchFor
Const HKEY_LOCAL_MACHINE = &H80000002
strSearchFor = “Java 7”
strComputer = “.”
Set WshShell = CreateObject(“wscript.Shell”)
Set oReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!\\” &_
strComputer & “\root\default:StdRegProv”)
strKeyPath = “SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall”
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
strDisplayName = WshShell.RegRead (“HKLM\” & strKeyPath & “\” & subkey & “\DisplayName”)
If InStr(1, strDisplayName, strSearchFor) > 0 then
WshShell.Run “msiexec.exe /norestart /X ” & SubKey & ” /qn”, 7, True
Else
End If
Next
x86 installation on a 64 bits system:
On Error Resume Next
Dim strSearchFor
Const HKEY_LOCAL_MACHINE = &H80000002
strSearchFor = “Java 7”
strComputer = “.”
Set WshShell = CreateObject(“wscript.Shell”)
Set oReg=GetObject(“winmgmts:{impersonationLevel=impersonate}!\\” &_
strComputer & “\root\default:StdRegProv”)
strKeyPath = “SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall”
oReg.EnumKey HKEY_LOCAL_MACHINE, strKeyPath, arrSubKeys
For Each subkey In arrSubKeys
strDisplayName = WshShell.RegRead (“HKLM\” & strKeyPath & “\” & subkey & “\DisplayName”)
If InStr(1, strDisplayName, strSearchFor) > 0 then
WshShell.Run “msiexec.exe /norestart /X ” & SubKey & ” /qn”, 7, True
Else
End If
Next
Thank you Guillaume! Very helpful!