I've been a bit confused with some of the registry examples I've seen so far...

Theres a registry string that may or may not exist. If it doesn't I want to add it. I need to check this string and if it does exist I need to write a new line without overwriting the previous data.

How can I achieve this?

Sorry if the question is vague.

Thanks