Check registry if exits if not then file - relevance. Help!

(imported topic written by madgogy)


Im new to this. Can You please hep me with relevance. I would like to check if registry for installed application exist and display name and version, if not check if file exists and display file version.

So I need to combine this two relevances:

unique values of ((if (exists value “DisplayVersion” of it AND exists value “DisplayName” of it) then (value “DisplayName” of it as string & " | " & value “DisplayVersion” of it as string) else (if (exists value “DisplayName” of it AND not exists value “DisplayVersion” of it) then (value “DisplayName” of it as string & " | <N/A>") else nothings)) of keys whose (value “DisplayName” of it as string starts with “AppName”) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of it) of (if x64 of operating system then (x64 registry;x32 registry) else registry)


if (exists file “C:\Program Files\ZBS\IzpisUPN\AppName.exe”) then "AppName | " & version of file “C:\Program Files\ZBS\IzpisUPN\AppName.exe” as string else “N/A”

Backgroud: on one computers was application installed trough msi and on others just copy/paste files.


(imported comment written by madgogy)

Ok. I made it. I don’t like how it look, but is working.

Thanks anyway.