param
(
[Parameter(Mandatory=$True)]
[string]$subkeyname,
[Parameter(Mandatory=$True)]
[string]$ValueName,
)
$regkey = [Microsoft.Win32.Registry]::ClassesRoot
$value = $regkey.OpenSubKey($subkeyname).GetValue($ValueName)
if(!($value))
{
write-host "Value does not exist."
}
else
{
write-host "Value exists."
}
No comments:
Post a Comment