We can pluralize the native registry, but I don’t think this relevance is where the issue lies.
q: if (exists values "PendingFileRenameOperations" of keys "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager" of native registries) then ((substrings separated by "%00" of (it as string)) of values "PendingFileRenameOperations" of keys "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager" of native registries) else ("N/A")
A: N/A
@tarwaniv
Do you have any relevance on the Relevance tab that might be throwing this error?
What is the result you are after here? A True | False to indicate if a file rename operation is pending, a list of the pending file rename operations or a True | False if a restart is pending?
pending restart will check more than just the existence of PendingFileRenameOperations so you could see True when a pending file rename isn’t the cause but is a good way of getting a simple view of if a system is in need of a restart.
substrings separated by "%00" whose (it != "") of (values "PendingFileRenameOperations" of keys "HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager" of native registry as string)
names of values of keys "PendingFileRenameOperations" is wrong so it triggering the “N/A” branch. Although your dont need it, you shoudl be checking for the value whose name of it = “PendingFileRenameOperations” but of you just pluralize the query, you can skip that altogether as with my earlier example from @brolly33 reply.
Q: ((substrings separated by "%00" of (it as string)) of values "PendingFileRenameOperations" of keys "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager" of registries)