I need to read the value of a registry key and compare the value's string to a list of acceptable strings. If the string exists, I need to make a note that it already exists so that when I read the next value I know if I have a duplicate string. If the string doesn’t exist, I need to create it and make a note that the value now exists. And, if I run into a duplicate string, I need to delete that value.

Could someone point me in the right direction? I can’t seem to get the logic started. Should I create a multi element array with the first element holding the acceptable string and the second element holding a value indicating whether the string already exist or not? Should I scrap the array concept and use some other method? Can someone help me out?