Using Registry

Hi all,
I'm writing a program to do stuff with registry and one question comes to me.
For example, the program which opens .txt files is written in HKEY_CLASSES_ROOT\txtfile\shell\open\command (Default). Though it seems to me that I should first check HKEY_CLASSES_ROOT\.txt (Default) and then go to where it points.
How portable is this? Can I expect to find the same information in the same place on another computer? On another Windows OS? Are there better ways to find/change it?
if you want it more portable, then open the text files with c++ commands... don't call a shell command


here's one way to open

http://www.cplusplus.com/reference/clibrary/cstdio/fopen/
Last edited on
That's not what I meant.. I'm asking what is the best way to access registry and how constant it's structure is.
you might want to check the structure on a microsoft site... if you want to access the registry here is a one site that google spit out

http://www.hellboundhackers.org/articles/918-windows-registry-using-c++-and-win32-api.html

here's a microsoft site that'll help you even more (it's about deleting a key, but from there you can find the rest)

http://msdn.microsoft.com/en-us/library/ms724235%28v=vs.85%29.aspx
that's still not it. but whatever. I (win xp) sent a little program to my friend (win7) and it worked fine so I'll assume everything is safe.
Topic archived. No new replies allowed.