Computer Science Canada

Confused

Author:  Geminias [ Wed Nov 16, 2005 11:00 pm ]
Post subject:  Confused

this program writes the key to the registry but fails to write the value.



c++:

#include <iostream>


int main ()
{

system("reg import test.reg");

return 0;
}



"Test.reg"
Code:
Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\test]
"test"="Hello"




Can someone please enlighten me as to of why it would instantiate a key but no value? Thanks in advance.

Author:  md [ Thu Nov 17, 2005 3:11 am ]
Post subject: 

if you're going to use the registry I recommend learning the proper interface instead of using a system hack. I can't think of an exact link right now, but I'm sure a quick google, or search of msdn will help.

Author:  [Gandalf] [ Thu Nov 17, 2005 3:56 pm ]
Post subject: 

I am fairly sure the more modern way of setting values in this way is to use and .ini file instead of the registry, and it might be easier too.


: