For the registry, Test-Path can only be used for keys, not values. So you could test for the existence of the key "HKCU:\SOFTWARE\Progressive Automotive Systems\R.O. Writer" using the cmdlet, but not any values in the key location.
One way to handle testing for a registry value is to detect the error from Get-ItemProperty.
One way to handle testing for a registry value is to detect the error from Get-ItemProperty.
Open in new window