レジストリのキーが存在するかどうかチェック

レジストリのキーが存在するかどうかチェックするPowershell

$tmp1 = test-path HKLM:"SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{4A0E73BB-0D67-4DB7-87BE-751068774920}"
$tmp2 = test-path HKLM:"SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{4A0E73BB-0D67-4DB7-87BE-751068774920}"
If (($tmp1 -eq $false) -and ($tmp2 -eq $false)){ Write-Output "Not Found." }