(imported topic written by SystemAdmin)
I am trying to write a fixlet that will will check multiple locations to see if a certain registry key exists or is set incorrectly and then take action to create or change it. I am pretty sure that I have the relevance correct as I can make changes in the registry and see the intended results displayed in the relevance debugger. The problem I am having is how to take the relevance I’ve written and translate that into an action.
I am thinking that if the fixlet finds more than one place where the value needs to be edited then it will return multiple results in the action script. Will that even work? Here is the relevance I’ve written that I was planning on trying to update for the action. If someone could take a look at make some suggestions it would be great.
exist keys whose (exist key “Software\Cisco\CSAgent” of it AND (not exist value “BalloonPopupsDisabled” of key “Software\Cisco\CSAgent” of it OR value “BalloonPopupsDisabled” of key “Software\Cisco\CSAgent” of it !=1))of key “HKEY_USERS” of registry
The registry value name “BalloonPopupsDisabled” can’t work in the HKLM and has to be put in for each user on the machine. The intended end result is for the value to be added if it doesn’t exist or changed to 1 if it does exist and doesn’t equal 1. Since there are subkeys of the HKEY_USERS hive that don’t correspond to real users then I put the check in for the “Software\Cisco\CSAgent” subkey so it would only be relevant on actual users.
My reasoning behind writing the relevance this way is that if I could get it to work then it wouldn’t matter who or if anyone was logged on to the machine where trying to make it use the current user stuff would. It would also take care of every user on the computer at once rather than waiting for them to login. Let me know if there’s a better way to accomplish my end result. Thanks!