I would like to test if notepad++ is installd via powershell and if installed, I will open a text file with notepad++ otherwise with notepad.
$textfile = "d:\fooBar.txt)"
if (<# notepad++ installed?#>
{
notepad++ $textfile
}
notepad $textfile
How can I achieve this? Thanks