none
IE 11 WMI Java Script 'GetObject' is undefined RRS feed

  • Question

  • I'm using Windows 7 with Internet Explorer 11. I have created a very simple JavaScript function to retrieve client machine information in an ASP.NET Page. I'm using the following code to get the client machine name , it gives me an error.

    var objWMIService = GetObject("winmgmts:\\root\\CIMV2");

    the above code works in IE 6,7,8 but not in IE 9,10,11.

    Error: "GetObject" is undefined. Request help from this forum. If "GetObject" is not supported anymore in IE 11 what is the alternative API.

    Any help is appreciated.

    Friday, July 18, 2014 11:12 PM

Answers

  • Repeating the question will not get you a different answer than before.

    You are not asking your question in the correct forum.

    Server-side ASP.NET code has nothing to do with what version of IE is running client-side.

    You need to ask your question in an ASP.NET forum. For example: http://forums.asp.net/


    -- Bill Stewart [Bill_Stewart]

    Monday, July 21, 2014 5:10 PM
    Moderator

All replies

  • GetObject with winmgmts has never been available in any version of IE.  It wilj only work using an HTA.

    To get help with ASP.NET pages please post in the ASP forum.

    http://forums.asp.net

    If you think this used to work then you need to go back and look closely at the code you think worked.  It is a system protected object and never available to IE.


    ¯\_(ツ)_/¯

    Friday, July 18, 2014 11:15 PM
  • Server-side ASP.NET code has nothing to do with what version of IE is running client-side.

    You need to ask your question in an ASP.NET forum. For example: http://forums.asp.net/


    -- Bill Stewart [Bill_Stewart]

    Saturday, July 19, 2014 3:58 AM
    Moderator
  • Thank you for the reply.

    I'm using "Get Object" in a JavaScript function and calling it in asp.net application on a button click.

    Kindly let me know if you know if you have any idea on how to get this worked.

    Monday, July 21, 2014 3:49 PM
  • Thank you for the reply.

    I'm using "Get Object" in a JavaScript function and calling it in asp.net application on a button click.

    Kindly let me know if you know if you have any idea on how to get this worked.

    It cannot be made to work in an ASP.Net page.  There is no way around this.

    You cannot run GetObject("winmgmts:") in an IE or other browser.  It is not allowed due to security settings and restrictions. 

    You can use GetObject if running IE6 in "Quirks" mode and in some modes on IE9.  You cannot access any object form a web page that is on the local computer.

    Post you issues in the ASP.Net forums to get more information on how to program ASP.Net web pages.  This is a scarping forum for non-web scripting.


    ¯\_(ツ)_/¯

    Monday, July 21, 2014 3:56 PM
  • Repeating the question will not get you a different answer than before.

    You are not asking your question in the correct forum.

    Server-side ASP.NET code has nothing to do with what version of IE is running client-side.

    You need to ask your question in an ASP.NET forum. For example: http://forums.asp.net/


    -- Bill Stewart [Bill_Stewart]

    Monday, July 21, 2014 5:10 PM
    Moderator