views:

773

answers:

2

Hi All,

Does anyone have any ideas on how to read the MSDTC configuration on the current machine? I am specifically trying to check that the user has performed the following steps:

  1. Open Component Management (Start > All Programs > Administrative Tools > Component Services)

  2. Double-click on Component Services, then expand Computers. Right-click on My Computer and select Properties

  3. On the MSDTC tab, click the Security Configuration button, and configure the properties as follows:

  4. Network DTC Access: Checked

  5. Allow Remote Clients: Checked

  6. Allow Inbound: Checked

  7. Allow Outbound: Checked

  8. Incoming Caller Authentication Required: Selected

It's part of a small component I need to write to validate end-user configuration. I don't think I would attempt to fix it if it were wrong: just point the user at the help file - so only read only is needed.

Thanks.

A: 

I'm not sure if you can do this programmatically from any API, or WMI. At least you can check the registry information at:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSDTC\Security
Magnus Johansson
Thanks, that works great. Change the values and compared in Beyond Compare...
Jonathan C Dickinson
This is absolutely the WRONG way to go, as it is an *implementation* detail not a defined contract (unlike the COM interfaces).
casperOne
+3  A: 

You can use the COM+ Administration classes/interfaces to do this. It will require COM interop though on your part.

The reference is located at:

http://msdn.microsoft.com/en-us/library/ms681189(VS.85).aspx

casperOne
Thanks, but I decided to use the easier route of the registry - I only need read access. Upvote.
Jonathan C Dickinson
@casperOneI have used the COM+ administration classes a lot over the years. I may just be blind, but with which classes can I control the MSDTC settings?
Magnus Johansson