I am running a VB6 application and need to add the ability to write a value to a registry, increment that value, then read.

I have don't this before, but I am very rusty.

I am need to write a demo type setting for my software, basically if you run it 3 times, the 4th you get a message.

I am pretty sure there are some code samples of how to do this...

Run program
If key does not exist in registry add it and set it value to 1
Run program again
set key value to 2
Run program again
set key value to 3
Run program again
Tell user they can no longer run the application.

If anyone can help me, and even go as far as zipping up a good example, it would be greatly appreciated.

thanks
kp