{"id":692,"date":"2008-08-09T08:05:38","date_gmt":"2008-08-09T12:05:38","guid":{"rendered":"http:\/\/wehuberconsultingllc.com\/wordpress\/2008\/08\/09\/supporting-technology-blog-archive-remove-old-versions-of-java-install-the-latest-with-no-auto-update\/"},"modified":"2008-08-09T08:17:41","modified_gmt":"2008-08-09T12:17:41","slug":"supporting-technology-blog-archive-remove-old-versions-of-java-install-the-latest-with-no-auto-update","status":"publish","type":"post","link":"https:\/\/wehuberconsultingllc.com\/wordpress\/2008\/08\/09\/supporting-technology-blog-archive-remove-old-versions-of-java-install-the-latest-with-no-auto-update\/","title":{"rendered":"Supporting Technology &raquo; Blog Archive &raquo; Remove old versions of Java &amp; Install the latest with no auto update!"},"content":{"rendered":"<p>I had several versions of Java on my PC and I lamented the fact that I needed to use \u00e2\u20ac\u0153Add\/Remove Programs\u00e2\u20ac\u009d to remove them. This <a href=\"http:\/\/incomservice.net\/icsblog\/2008\/08\/remove-old-versions-of-java-install-the-latest-with-no-auto-update\/\">script<\/a> came in handy although my copy and paste of the code needed several fixups before it would work. The single and double quotes from the copy were funky according to DOS. So I have posted my cleaned up copy. The <a href=\"http:\/\/wordpress.org\/extend\/plugins\/syntaxhighlighter-plus\/\">SyntaxHighlighter Plus plugin<\/a> has solved this copy problem for me in the past. Good Luck!<\/p>\n<pre class=\"brush: vb; title: ; notranslate\" title=\"\">\r\nRem to run this file and log the output use: &quot;uninstall java.bat&quot;&gt;&gt;java_remove.log\r\nRem @echo off &amp;\r\ncls\r\nRem List all Installation subkeys from uninstall key.\r\necho Searching Registry for Java Installs\r\nfor \/f %%I in ('reg query HKLM\\SOFTWARE\\microsoft\\windows\\currentversion\\uninstall') do echo %%I | find &quot;{&quot; &gt; nul &amp;&amp; call :All-Installations %%I\r\necho Search Complete..\r\ngoto :NoneFound\r\n:All-Installations\r\nRem Filter out all but the Sun Installations\r\nfor \/f &quot;tokens=2*&quot; %%T in ('reg query %1 \/v Publisher 2^&gt; nul') do echo %%U | find &quot;Sun&quot; &gt; nul &amp;&amp; call :Sun-Installations %1\r\ngoto :EOF\r\n:Sun-Installations\r\nRem Filter out all but the Sun-Java Installations. Note the tilda + n, which drops all the subkeys from the path\r\necho %1\r\nfor \/f &quot;tokens=2*&quot; %%T in ('reg query %1 \/v DisplayName 2^&gt; nul') do echo . Uninstalling - %%U: | find &quot;Java&quot; &amp;&amp; call :Sun-Java-Installs %~n1\r\nif errorlevel 1 (\r\necho Doing further conditional checking on variables.\r\nfor \/f &quot;tokens=2*&quot; %%T in ('reg query %1 \/v DisplayName 2^&gt; nul') do echo . Uninstalling - %%U: | find &quot;J2SE&quot; &amp;&amp; call :Sun-Java-Installs %~n1\r\n)\r\ngoto :EOF\r\n:Sun-Java-Installs\r\nRem Run Uninstaller for the installation\r\nMsiExec.exe \/x%1 \/qb \/quiet \/passive \/promptrestart\r\necho . Uninstall Complete, Resuming Search..\r\ngoto :EOF\r\n:NoneFound\r\nRem No Java found to remove from this system\r\necho No Java found or all versions already removed from this system\r\ngoto :EOF\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I had several versions of Java on my PC and I lamented the fact that I needed to use \u00e2\u20ac\u0153Add\/Remove Programs\u00e2\u20ac\u009d to remove them. This script came in handy although my copy and paste of the code needed several fixups before it would work. The single and double quotes from the copy were funky according &hellip; <a href=\"https:\/\/wehuberconsultingllc.com\/wordpress\/2008\/08\/09\/supporting-technology-blog-archive-remove-old-versions-of-java-install-the-latest-with-no-auto-update\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Supporting Technology &raquo; Blog Archive &raquo; Remove old versions of Java &amp; Install the latest with no auto update!&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[1],"tags":[],"class_list":["post-692","post","type-post","status-publish","format-standard","hentry","category-general"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p4iN3d-ba","jetpack-related-posts":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/posts\/692","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/comments?post=692"}],"version-history":[{"count":3,"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/posts\/692\/revisions"}],"predecessor-version":[{"id":693,"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/posts\/692\/revisions\/693"}],"wp:attachment":[{"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/media?parent=692"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/categories?post=692"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wehuberconsultingllc.com\/wordpress\/wp-json\/wp\/v2\/tags?post=692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}