title: Disabling Windows Error Reporting(AppCrash) dialog programmatically
body: <p>I am executing a Process in .NET app.</p>
  
  <pre><code>                Process process = new Process(); 
  
  ....
  
                  process.StartInfo.UseShellExecute = false;
                  process.StartInfo.ErrorDialog = false;
  
                  process.StartInfo.CreateNoWindow = true;
                  process.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
  ....
                  process.Start();
  </code></pre>
  
  <p>The problem is that the executable sometimes crashes, which is OK, but the AppCrash dialg pops up and prevents the app to continue the execution until I click on close.</p>
  
  <p>I know that I can set <code>HKLM\Software\Microsoft\Windows\Windows Error Reporting\</code> value Disabled to true -  msdn.microsoft.com/en-us/library/bb513638%28v=vs.85%29.aspx </p>
  
  <p><strong>But is there a way that I can do this in code?</strong></p>
  
  <p>EDIT:</p>
  
  <p>kmp has posted a great answer, but I am still looking how to achieve the same with native application.</p>