Set Permissions on a Registry Object with j-interop

1.1k Views Asked by At

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

2

There are 2 best solutions below

3
On

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.

0
On

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.