My code is an example. I have no idea how your environment is setup. \:D You will have to modify it so that it works for you.

The way it is written, it should check each group. You will need to modify the code properly to point/create the correct icons. Then, If they are in all three groups and have never run the script before, they should have 6 new icons.

Is that not what you want?