title: How to check if Notepad++ is installed using Powershell
body: <p>I am writing some powershell script to check if notepad++ is installed on my laptop. Though I'm having some issues with this.</p>
  
  <p><strong>Here's the code:</strong></p>
  
  <pre><code># Variable(s)
  
  $regkey = "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Notepad++"
  #
  # Check if Notepad ++ is already installed.
  
  If($regkey)
  {
      Write-output "Notepad++ is already installed on your machine."
  }
  Else
  {
      Write-Output "Notepad++ is not installed on your machine."
  } 
  </code></pre>
  
  <p>I uninstalled notepad++ manually. I then executed the script and the output message that was displayed was that notepad++ is installed, when it isn't. Why is this? </p>
  
  <p>Any help will be much appreciated.</p>