title: How do you stop Windows from asking "How do you want to open this file?" when Process.Start fails?
body: <p>Consider the following code, which simply starts a process from VB.NET:</p>
  
  <pre><code>Public Shared Sub ShellandWait(ProcessPath As String, Optional Arguments As String = "")
  
      'Starts a process/program and waits for it to finish before execution continues.
  
      Using objProcess As New System.Diagnostics.Process
  
          objProcess.StartInfo.FileName = ProcessPath
          objProcess.StartInfo.Arguments = Arguments
          objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Normal
          objProcess.StartInfo.ErrorDialog = False
  
          objProcess.Start()
  
          'Wait until the process passes back an exit code 
          objProcess.WaitForExit()
  
          'Free resources associated with this process
          objProcess.Close()
  
      End Using
  
  End Sub
  </code></pre>
  
  <p>If we pass in a file name for ProcessPath, say "C:\test.xml", but no program is associated with the .xml extension, Windows 10 will pop up a box asking "How do you want to open this file?"</p>
  
  <p>Is there anyway to prevent Windows from opening this popup?  I'd like this scenario to be handled in code instead of Windows interjecting itself. </p>
  
  <p>EDIT:  I don't want to find the program associated with the extension.  In the majority of cases where Process.Start fails, there will be no program available to handle the file type (I just used xml as an example).  My code currently warns the user that the appropriate application is not found, but the popup from Windows also shows, which I find confusing.  I just want to disable the popup from showing, if possible.</p>