'Check currently installed Notepad++ version in Powershell

I need to know the currently installed Notepad++ version for an auto update script. Does anybody know how I can get it within Powershell? Maybe there is a registry entry?



Solution 1:[1]

The following command (Get-Item "C:\Program Files\Notepad++\notepad++.exe").VersionInfo.FileVersion returns 7.88

That should probably be enough.

Solution 2:[2]

You can add to @Mohammed Shabeer kp answer and combine this with my gist to silently install Notepad++ on your systems. I'll work on adding the the registry query to the script to check if Notepad++ is installed first. This way we dont download unnecessary files.

Install-NotepadPlusPlus.ps1

Solution 3:[3]

You can use Get-ItemProperty to get the whole properties and then output the version from the property list. Hope the below helps.

$w64=Get-ItemProperty HKLM:\Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\* | where-Object DisplayName -like 'NotePad++*'
$w32=Get-ItemProperty HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*  | where-Object DisplayName -like 'NotePad++*'

if ($w64) {
     write-Host $w64.DisplayVersion 
} elseif ($w32) {
     write-Host $w32.DisplayVersion
} else {
     Write-Output "No Version Found"
}

Solution 4:[4]

If you are using windows 10, you can right-click it and select properties and click on details. You can find the current version of any application

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Caleb
Solution 2 cjerrington
Solution 3
Solution 4 user14798728