Add Excluded Applications to Windows Error Reporting

#Powershell

The place I am working at is using an app called Exclaimer to put signatures on email.  It drives me mad, and it creating mini dumps when it crashes.  Found a server if 10GB of min dump.

Check it out, open control panel and then in the search box type Problem Reports. Then select View all problem reports from the list.  So you can clear them from here, but I wanted to stop them being generated for Exclaimer.

So from Problem reports, click action Centre in the address bar and under maintenance there is setting.  Then at the bottom of Problem Reporting Setting is the option to exclude from reporting.  As you would expect this is just a registry hack, but you have to know what service is running the application you want to exclude.  So check the service and then you can adapt this:

#Start Control Panel and search for "Problem Reporting"
#http://support.microsoft.com/kb/163846
#NT AUTHORITY\LOCAL SERVICE S-1-5-19 
#NT AUTHORITY\NETWORK SERVICE S-1-5-20

#http://blogs.microsoft.co.il/scriptfanatic/2010/05/16/quicktip-additional-powershell-registry-drives/
$null           = New-PSDrive -Name HKU -PSProvider Registry -Root Registry::HKEY_USERS
$path           = "HKCU:\Software\Microsoft\Windows\Windows Error Reporting\ExcludedApplications"
$LocalService   = "HKU:\S-1-5-19\Software\Microsoft\Windows\Windows Error Reporting\ExcludedApplications"
$NetworkService = "HKU:\S-1-5-20\Software\Microsoft\Windows\Windows Error Reporting\ExcludedApplications"

if (-not (Test-Path -Path $path)){$null = New-Item -Path $path}
if (-not (Test-Path -Path $LocalService)){$null = New-Item -Path $LocalService}
if (-not (Test-Path -Path $NetworkService)){$null = New-Item -Path $NetworkService}

$apps  = @()
$apps += "Exclaimer.PolicyProcessingEngine.RemoteDeploymentService.exe"
$apps += "Exclaimer.PolicyProcessingEngine.ConfigurationService.exe"
$apps += "Exclaimer.PolicyProcessingEngine.RemoteDeploymentService.exe"
$apps += "Exclaimer.Connectors.MailRules.ExchangeUpdateService.exe"

ForEach($app in $apps){
  Write-Host $app
  Set-ItemProperty -Path $path           -Name $App -Value 1 -Type DWord
  Set-ItemProperty -Path $LocalService   -Name $App -Value 1 -Type DWord
  Set-ItemProperty -Path $NetworkService -Name $App -Value 1 -Type DWord
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.