you can use the RegSetValueEx API call to edit a value in the registry.

If you need some sample code I will be able to send you some.