Forum posts for msdtc.exe

Chef Guard for Windows Firewall with Custom GUID

I am able to create a custom Windows Firewall rule with Chef and Powershell. I am having a problem with not_if.

I have used the Registry key methods from here:
http://docs.opscode.com/resource_registry_key.html

A custom firewall rule creates a registry key with a random GUID. I am not able to use the methods because I do not know the key name. The key value will be the same on each node, but not the key name.

The following works. But a custom key has a GUID for the key name

execute 'enableMSDTCFirewall' do
command 'netsh advfirewall firewall set rule group='Distributed Transaction Coordinator' new enable=yes'
action :run
not_if { registry_data_exists?('HKLM\SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\FirewallRules', {:name => 'MSDTC-In-TCP', :type => :string, :data => 'v2.20|Action=Allow|Active=TRUE|Dir=In|Protocol=6|App=%SystemRoot%\system32\msdtc.exe|Name=@FirewallAPI.dll,-33503|Desc=@FirewallAPI.dll,-33506|EmbedCtxt=@FirewallAPI.dll,-33502|'})}
end


Other then a flag, I cannot figure out another way to check if the rule exists and not have the script execute during each client run. Any ideas?

Ended up with this working

execute 'enableFirewallRuleNameOutbound' do
command 'powershell.exe New-NetFirewallRule -DisplayName 'RuleName' -Direction Outbound -LocalPort 20000 -Protocol TCP -Action Allow'
action :run
not_if 'netsh advfirewall firewall show rule name='RuleName' > nul'


end

View complete forum thread with replies

Other posts related to msdtc.exe

See Related Forum Messages: Follow the Links Below to View Complete Thread

When machine-wide tracing is enabled, where does ODBC store logs for NETWORKSERVICE?
msdtc missing on Windows Embbeded 8 Standars WE8S
MSDTC (Distributed Transaction Coordinator) Service Stops Unexpectedly
MSDTC (Distributed Transaction Coordinator) Stops working. Error code -1073737669
Chef Guard for Windows Firewall with Custom GUID
MSDTC.exe listening on port 5357 but DCOM port range restricted to 5000-5020
How should MSDTC be configured to use SSL with Websphere MQ when coordinating a distributed …
When running odbcad32 as Administrator, machine-wide tracing still not available
Is it possible to programmatically get the server details from an ODBC DSN?

What is the carbon footprint of your coffee?

Is it low? Is it high? Can this things really kill the planet Earth? Maybe the answer will surprise you. Maybe not.