3 Replies Latest reply on Aug 16, 2016 10:43 AM by Bill Robinson

    Compliance Rule Condition not Working Properly

    Richard Sye

      I have the issue that i have the following condition where for a Linux system the platform complains that it cannot find a suitable Extended Object, but this is because the EO is only intended for Windows. Can someone explain what the "IF" statement that defines what conditions to run based on the OS is not working properly? I would expect that the "foreach" loop is not even evaluated if the OS does not match Windows.

       

       

      if

         ??TARGET.OS_ENUMERATED_VALUE*?? = "Linux"

      then

         foreach "Configuration File Entry:/etc/mtab//**"

            (  @Name@ does not contain "server_hostname"  OR

               @Name@ does not contain "xxx.xxx.xxx.xxx"

            )  AND

            @Name@ does not contain "/filesystem/path"

         end

      elseif

         ??TARGET.OS_ENUMERATED_VALUE*?? = "Windows"

      then

         foreach "Extended Object Entry:HKEY_USERS_TREE//**"

            ??LOOP_ATTR_FOR_COMPLIANCE_STR?? := @Name@  AND

            if

               "Registry Key:??LOOP_ATTR_FOR_COMPLIANCE_STR??\Network" exists

            then

               "Command:REG QUERY ??LOOP_ATTR_FOR_COMPLIANCE_STR??\Network /s".Out_Put does not contain "/filesystem/path"

            end

         end

      end

       

      Error Message that is received:

       

      Screen Shot 2016-08-16 at 16.45.21.png