How do I check for the presense of a registry key and gracefully exit if the key does not exist? Thsi is what I have so far and it throws an error instead of echo'ing the text I want.
dim SAV
set shell = CreateObject("Wscript.Shell")
SAV = shell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{948AC794-8B81-440A-81AE-6474337DB527}\Publisher")
if err.Number <> 0 then
Wscript.Echo "it's not installed"
else
Wscript.Echo "It's installed"
end if
Thanks in advance.
dim SAV
set shell = CreateObject("Wscript.Shell")
SAV = shell.RegRead("HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{948AC794-8B81-440A-81AE-6474337DB527}\Publisher")
if err.Number <> 0 then
Wscript.Echo "it's not installed"
else
Wscript.Echo "It's installed"
end if
Thanks in advance.