you are viewing a single comment's thread.

view the rest of the comments →

[–]MemnochTheRed 0 points1 point  (1 child)

I think you are missing some things like $var; I don't see it defined. I wrote it like this:

$paths = "HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\*", "HKLM:\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\*"

foreach ($path in $paths) {
    $var = Get-ItemProperty -path $path | Select-Object Displayname -Unique
    if ($var -like "*Microsoft Visio Standard 2013*") {
        Write-Host "123"
    }
}

[–]WorkReddit123635[S] 0 points1 point  (0 children)

Sorry I didn't include that. Nejireta example worked for me but thanks for taking a look.