If not installed

(imported topic written by SystemAdmin)

Greetings all,

Can someone please help me add something to this, if java is not installed?

Here is my current relevance that displays the desired results:

concatenation ", " of names of keys of key “HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment” of registry

Except for the “” when java is not installed. I would like it to return “Not Installed”. Thank you in advance.

(imported comment written by jessewk)

Alfred,

Adding just one character will make your property return nothing instead an error:

concatenation ", " of names of keys of keys “HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment” of registry

If you want it to return “Not Installed” instead nothing, you can wrap it in an if statement:

if (exists keys of keys “HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment” of registry)
then (concatenation ", " of names of keys of keys “HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment” of registry)
else (“Not Installed”)

(imported comment written by SystemAdmin)

Works like a charm, thank you jessewk.