Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

j-interop access denied with Server2008 R2

jribeauv
2010-05-22
2013-02-05
  • jribeauv
    jribeauv
    2010-05-22

    Hi,

    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 ,

    jribeauv

     

  • Anonymous
    2010-06-29

    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.
    -Chad

     
  • aditi
    aditi
    2013-01-29

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

     
  • ben
    ben
    2013-02-05

    If you're targeting a 64-bit system (e.g. Windows 2008 R2), you need to perform the above ownership change for:
    HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Wow6432Node\CLSID{YOUR CLSID HERE}

    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!