Access is denied on Windows 7?

  • joe_999999

    joe_999999 - 2011-10-24

    Want to access performance counters via WMI. Receive the following error when accessing the local counters (when attempting to authenticate) on my 64 bit Windows 7 work station.

    org.jinterop.dcom.common.JIException: Access is denied, please check whether the  are correct. …, so as to avoid such exceptions. 

    In the following Java code the 'new JIComServer' call produces the above error. Domain is "localhost", hostname is the work station name, username and password are my login on Windows 7. My login has been granted administrator privilege.

    dcomSession = init(domain, username, password);
    comServer = new JIComServer(valueOf("WbemScripting.SWbemLocator"), hostname, dcomSession);

    On the windows 7 workstation in 'Component Services->My Computer->Properties->Default Properties' 'Distributed COM' and 'COM Internet Services' are both enabled. 'Default Authentication Level' is set to Connect. 'Default Impersonation Level' is set to Identify.

    In 'COM Security->Access Permissions' my login has Local and Remote Access checked.
    In 'COM Security->Launch and Access Permissions' my login has Local and Remote with Launch and Activation checked. i.e. all 4 check boxes.

    Help! Would very much like to use j-Interlop.

    Note: A C++ program running under my login encounters no issues authenticating and issuing WMI queries to the local Windows 7 workstation.

  • Nandan

    Nandan - 2011-10-24

    Can u check permission on  HKEY_CLASSES_ROOT\CLSID\76a64158-cb41-11d1-8b02-00600806d9b6, which is for the WBEM Scripting Locator.

  • joe_999999

    joe_999999 - 2011-10-24

    It worked. Thank you!

  • Scott Selikoff

    Scott Selikoff - 2011-11-15

    I'm having the same issue.  If I enable autoRegistration, I get access denied.  Tried modifying the HKCR key but no change.

  • Vikram Roopchand

         On Win7, i think only the "TrustedInstaller" has the right to make changes to the Hive. Can you confirm ?

    best regards,

  • Anonymous - 2011-12-12

    Hi everyone,

    i'm having the same issues too. I tried to run the examples MSADO, MSWMI and MSWMI2 provided in the test package. However, in all three cases i get the "Access is denied" error message. Changing permissions of WBEM Scripting Locator has no effect. Also i ran the examples locally and remote, involving different user accounts. The result is always the same…

    I'm kinda stuck. There must be a way to successfully execute the examples. Any suggestions are greatly appreciated…

    Thanks in advance

  • Vikram Roopchand

         Can you check the "Local Security Policy" , what does it say for "Network Access: Sharing and security model for Local accounts " ? Should be "Classic -- " .

    best regards,

  • Anonymous - 2011-12-14

    Hi Vikram,

    thanks for your answer. While searching this forum for possible solutions, I already stumbled upon the local security policy hint. However, even though its set to 'Classic- …', i am still getting the 'access denied' error message.
    Any other advice?

    Btw, my OS is Win7x64…


  • Erez

    Erez - 2011-12-19

    Hi Alex,

    If you're running x64, can you check the permission for for the following registry key also?


  • Anton Sysoev

    Anton Sysoev - 2012-07-23

    It may occurs when a user have empty password in the system.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks