How to detect Internet Explorer options, particularly Tools-Internet Options-Advanced Settings


I have an ASP application that runs on different versions of Windows (XP, 2000, 2003) and IE (5.5, 6, 7)

Because of legacy compliance the web application has to work with Microsoft Java Virtual Machine (MSJVM) or with Sun Java, so we have a different set of applets for each virtual machine. Now, the question is how can i detect wich version of Java is enabled on "Tool-Internet Options-Advanced Settigs"? MSJVM or Java (Sun)?

The clients can have installed one of them or both but the important thing is wich one is enabled in IE.


Who is Participating?
b0lsc0ttConnect With a Mentor IT ManagerCommented:

You will have to use Javascript to do this.  Javascript can't look at the settings in that area and is limited in what it can get about the browser, computer, etc.  However it is designed so you can see if objects, etc exist.  That is the method to use to test which browser you have and which option (in your case VM) to use.  Can you provide specifics on the different applets or objects including the code you would use and I will be happy to help make some Javascript that will test which to use.

An example of this is ...

if (object) {  // that object is there so must be installed or browser 1
    // method 1
} else {  // not there so use alternative
    //  method 2

Using try/catch is also a way to get the script to use the method that will work or produce a friendly error if nothing will.

Let me know if you have any questions or need more information.

JohannRamonAuthor Commented:
Thanks b0lsc0tt:

Finally i checked first the Sun virtual machine with code like this one.

Best regards,


            var SJVM = document.JavaVersionApplet.getJavaVersion();
            alerta += "SUN VM: " + SJVM + " enabled\n";
            if (SJVM < "1.6"){
                alerta += "Update to 1.6\n";
                JVMSUN = true;
            alerta += "SUN VM: Not installed or not enabled\n";

Open in new window

b0lsc0ttIT ManagerCommented:
Your welcome!  I'm glad I could help.  Thanks for showing the specifics of how you used it.  Also thanks for the grade, the points and the fun question.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.