I have created relevance code to identify computers in which two specific files exist in a given folder, but I believe it can me enhanced to a more efficient version, can you propose a better solution? Thanks
This is the relevance code:
if exists folder (value “ProgramFilesDir” of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion” of native registry as string & “\sub1\sub2”) then (exists file “exe1.exe” of folder (value “ProgramFilesDir” of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion” of native registry as string & “\sub1\sub2”) OR exists file “exe2.exe” of folder (value “ProgramFilesDir” of key “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion” of native registry as string & “\sub1\sub2”)) else false
I have noticed that when trying to evaluate for the files existence in this case \sub1\sub2", if the folder exists, it evalutes ok, but if it doesn´t, it will produce an error in fixlet debugger, saying that singular expression refers to nonexistent object, to avoid this, I evaluate first for the folder existence, if the file doesn´t exist it will evalute to false. Also, for some reason fixlet debugger is showing that “|” is an illegalcharacter.