j-interop access denied with Server2008 R2

  • jribeauv


    I'm using PrintInstances to check WMI access from Linux and Windows Client on a Server2008 target.

    First server  is a 2008 Server SP2 Standard full installation ; no issue . I'm able to get WMI datas from it.

    Second server  is a 2008 Server R2 Standard full installation ; no issue . I'm not able to get WMI datas from it. ( error : access denied)

    Regarding firewall , DCOM security , I use same settings on both servers.

    By using powereshell no issue on server2008 R2 ; it seems that issue is between j-interop and something new  on server2008 R2 release.

    I'm the only one to encounter this problem.

    Any idea what it could be ?

    Thanks ,



  • Anonymous

    This is a common problem on Windows Server 2008 R2.  It's because JInterop can't modify the registry.

    Here's a workaround that should do the trick (if you're ok with modifying the registry like this).

    1. Login to the target remote host as an Administrator.
    2. Run the program Regedit
    3. If you are asked to allow the Regedit program to make changes to the computer, click 'Yes'
    4. Navigate to the Registry item HKEY_CLASSES_ROOT\CLSID\{YOUR CLSID HERE}
    5. Right click on this item and select 'Permissions'
    6. Click 'Advanced'
    7. Select the 'Owner' tab
    8. In the 'Change Owner to…' box, highlight the account you are currently logged in as.
    9. Click 'Ok'
    10. Click 'Ok'
    11. Right click the registry item again and select 'Permissions'
    12. Highlight the 'Administrators' group
    13. Give 'Full Control' permissions to this group by checking the 'Allow' box
    14. Click 'Ok'

    Hope this helps.

  • aditi

    Please help me...it is not working for me....
    I tried all of this..

  • ben

    If you're targeting a 64-bit system (e.g. Windows 2008 R2), you need to perform the above ownership change for:

    Related to registry redirection on 64-bit systems: http://msdn.microsoft.com/en-us/library/windows/desktop/aa384253(v=vs.85).aspx

    Hope that helps!