Posted by adiitt
on August 12, 2009 at 5:44 AM PDT
I have made this simple batch file for disabling the NG plugin but could not test it because my Vista system is down. I could test this on XP though and it works fine. I shall test it once my Vista sys is up and functional.
Meanwhile if someone could test and let me know how it goes for you on diff other win flavours it would be very helpful in improving the logic...
If testing on a vista box, pls let me know if it asks you for any previleges when run as a non admin (UAC on). Thnx much.
::Get the JRE version in use
Set JRERegPath="HKLM\SOFTWARE\JavaSoft\Java Runtime Environment"
For /F "tokens=2* delims= " %%A In ('Reg Query %JRERegPath% /v Java6FamilyVersion') Do Set Version=%%B
::Set the Registry Key value to 0x00000000; disabling
Set JPIRegPath="HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Plug-in\%Version%"
Reg Add %JPIRegPath% /v UseNewJavaPlugin /t REG_DWORD /d 0x00000000 /f
::Read the JRE home and make the path to ssvagent.exe
For /F "tokens=2* delims= " %%A In ('REG QUERY %JPIRegPath% /v JavaHome') Do Set JavaHome=%%B
%SSVAgent% -high -jpisetup -old
1. http://forums.java.net/jive/thread.jspa?threadID=55752&tstart=-1 ( MThanks to hovme )
2. http://bugs.sun.com/view_bug.do?bug_id=6854813 (Good info)