を取得jinterop:私は以下のコードを実行すると、Windowsのイベントログ
JISession dcomSession = JISession.createSession(domain, user, pass);
dcomSession.useSessionSecurity(false);
JIProgId id = JIProgId.valueOf("WbemScripting.SWbemLocator");
id.setAutoRegistration(true);
JIComServer wbemLocatorComObj = new JIComServer(id, host,dcomSession);
例外が発生します。
org.jinterop.dcom.common.JIException: Access is denied, please check whether the [domain-username-password] are correct. Also, if not already done please check the GETTING STARTED and FAQ sections in readme.htm. They provide information on how to correctly configure the Windows machine for DCOM access, so as to avoid such exceptions. [0x00000005]
at org.jinterop.winreg.smb.JIWinRegStub.winreg_CreateKey(JIWinRegStub.java:310)
at org.jinterop.dcom.core.JIComServer.initialise(JIComServer.java:510)
at org.jinterop.dcom.core.JIComServer.<init>(JIComServer.java:414)
at main.java.EventLogListener.getWmiLocator(EventLogListener.java:43)
at main.java.EventLogListener.main(EventLogListener.java:87)
Caused by: org.jinterop.dcom.common.JIRuntimeException: Access is denied, please check whether the [domain-username-password] are correct. Also, if not already done please check the GETTING STARTED and FAQ sections in readme.htm. They provide information on how to correctly configure the Windows machine for DCOM access, so as to avoid such exceptions. [0x00000005]
at org.jinterop.winreg.IJIWinReg$createKey.read(IJIWinReg.java:459)
at ndr.NdrObject.decode(NdrObject.java:36)
at rpc.ConnectionOrientedEndpoint.call(ConnectionOrientedEndpoint.java:137)
at rpc.Stub.call(Stub.java:113)
at org.jinterop.winreg.smb.JIWinRegStub.winreg_CreateKey(JIWinRegStub.java:304)
... 4 more
それが動作するときJIProgId id = JIProgId.valueOf("InternetExplorer.Application");
I「は、ホストdomianユーザのパスワードがOKである確信していますなぜ上はうまくいかないのですか?
お願いします。
管理者レベルの資格情報を使用していますか? – nIKUNJ
この場合、管理者である必要はありません。 – AlexR