none
Access Denied error for WMI MSSerial Port query RRS feed

  • Question

  • I have an application which use wmi to check serial port name using the following code:
    ManagementObjectSearcher searcher =
      new ManagementObjectSearcher("root\\WMI",
      "SELECT * FROM MSSerial_PortName");
    

    On my personal computer where I have windows 7 instaled everything is working but when I deploy to Windows Embedded Standard 7 then I've got a access denied error.

    Is there any component which should be instaled to run this query?

    Thanks for any advice

     

    Friday, May 13, 2011 8:27 AM

All replies

  • Did you run the script with elevate privalages or with UAC turned off?

    -Sean


    www.sjjmicro.com / www.seanliming.com / www.annabooks.com, Book Author - ProGuide to WES 7, XP Embedded Advanced, WEPOS / POS for .NET Step-by-Step
    Friday, May 13, 2011 4:32 PM
    Moderator
  • I was testing other scripts and everything is working. Do you have any other idea?
    Thursday, May 19, 2011 8:48 AM
  • My only other guess: Is there something else claiming the COM port?

    -Sean

     


    www.sjjmicro.com / www.seanliming.com / www.annabooks.com, Book Author - ProGuide to WES 7, XP Embedded Advanced, WEPOS / POS for .NET Step-by-Step
    Thursday, May 19, 2011 3:34 PM
    Moderator
  • I have an application which use wmi to check serial port name using the following code:
    ManagementObjectSearcher searcher =
      new ManagementObjectSearcher("root\\WMI",
      "SELECT * FROM MSSerial_PortName");
    

    On my personal computer where I have windows 7 instaled everything is working but when I deploy to Windows Embedded Standard 7 then I've got a access denied error.

    Is there any component which should be instaled to run this query?

    Thanks for any advice



     I have the same problem.  Anyone?


    • Edited by XirisJohn Tuesday, July 23, 2013 9:04 PM Typo
    Tuesday, July 23, 2013 9:04 PM