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
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
2011-10-24
It worked. Thank you!
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
2011-11-16
Hi,
On Win7, i think only the "TrustedInstaller" has the right to make changes to the Hive. Can you confirm ?
thanks,
best regards,
Vikram
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
Alex
Vikram Roopchand
2011-12-13
Hi,
Can you check the "Local Security Policy" , what does it say for "Network Access: Sharing and security model for Local accounts " ? Should be "Classic -- " .
Thanks,
best regards,
Vikram
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…
Thanks
Alex
Erez
2011-12-19
Hi Alex,
If you're running x64, can you check the permission for for the following registry key also?
HKLM\Software\Classes\Wow6432Node\CLSID\{76A64158-CB41-11D1-8B02-00600806D9B6}
Thanks,
Erez
Anton Sysoev
2012-07-23
It may occurs when a user have empty password in the system.