10 Replies Latest reply on Nov 10, 2014 4:26 PM by Joe Piotrowski

    How to iterate through mulitiple object using for each loop

    Manas P

      Hi Experts,


      I am looking to iterate a loop for checking multiple objects value in compliance rule (Registry object).


      Lets take ab an example for screen saver setting under (HKEY_USERS). All the sub trees have screensaver setting.

      In case of single object we can write the rule as below and it is working as expected.


      "Registry Value:HKEY_USERS\.DEFAULT\Control Panel\Desktop\ScreenSaveTimeOut" count equals 600


      But I am unable to figure it out how to iterate for all other reg paths as well. I want to verify if sub trees contains the path "Control Panel\Desktop\ScreenSaveTimeOut"  and if exist then what it is set to ?

      I tried using below logic it does not worked out for me.


      "Registry Value:HKEY_USERS\\**\Control Panel\Desktop\ScreenSaveTimeOut" count equals 600



      Please point me to the correct syntax.