title: When is it safe to uninstall SQL Server Native Client programmatically?
body: <p>How do you determine when it is safe to uninstall the 'SQL Server Native Client'? I believe that simply checking whether there is an SQL Server instance installed is naive.</p>
  
  <p>I've tried researching and testing the behavior of the following keys, among others, but they don't seem to give me what I need:</p>
  
  <pre><code>HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Native Client\MSIRefCount
  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SNAC\MSIRefCount
  ...
  </code></pre>
  
  <p>I'm using Win32/Windows API via C++.</p>