1

Accessing WMI using DCOM requires that the user has permissions on:

HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID{76A64158-CB41-11D1-8B02-00600806D9B6}

Unfortunately Windows 7 and Server 2008 have this setup so that the Administrators group does not have full control! TrustedInstaller is the owner and has full control.

I need to do this via j-interop

Take ownership of the registry object and all sub-objects (to Administrators group) I believe this automatically gives full control permission s.

Any help would be massively appreciated

codeplumber
  • 469
  • 2
  • 11
  • Hi, as far as I know that is not possible, you could only change this manually. The TrustedInstaller is part of the Windows security system. I have tried to change this by an installer which should change the registry entries and configure the clients for j-interp also with no success. – Björn Dec 13 '11 at 20:10
  • Thanks for the tip Bjorn. If you turn it into an answer I'll vote it up a point. – codeplumber Dec 14 '11 at 23:13

2 Answers2

0

I do not think you can do it via j-interop. It can be done by changing the owner of the registry file to Administrator or Distributed COM Users or Performance Monitor Users group and then adding Full Control or Read privileges to the Administrator and user groups over the folder.

Shreesha A
  • 23
  • 4
0

I'm very interested in a programmatic solution to this question. So far I can only do it manually by logging in to the desired system and right-clicking on "Permissions" in regedit.

These links look relevant:

For the second link, the response suggests that Microsoft considers some registry keys should be "protected" by being owned by the TrustedInstaller user, and others not. In that case, I wonder if there isn't some other legitimate way to get WMI to work remotely.

Community
  • 1
  • 1
Zadan
  • 71
  • 5
  • I couldn't get j-interop to do it. So I implemented a C++ WIndows console app to take ownership of the 2 reg keys. Let me know if you're interested... – codeplumber Jan 23 '12 at 08:23
  • Hi, I am interested in the console app this could also solve my problem to create an installer ;-). Thanks – Björn Feb 07 '12 at 15:58
  • @ codeplumer, do you get a solution for this? I run into the same issue to use j-interop monitoring Win7.I know JOCAB does work for this, but it did not work under Linux. – Simon Wang Sep 03 '12 at 01:13