I am working in vc++ 6. I need help with setting the default value of a registry key. I can create registry keys and set them ok with RegCreateKeyEx() and RegSetValueEx(). My problem is I can't for the life of me figure out how to set the default key value to "C:\MYPROGRAM~1\MYPROGRAM"%1"". When I try to create it as the default key it creates another key and leaves off the "%1" part. What I am tring to do is the same thing that happens when you highlight a file in Windows Explorer, Ctrl/Shift and select Open with. If you check Always open with, this sets up a registry key for that program and file extenstion. Does anyone know how to do this?