
-----------------------------------
Geminias
Wed Nov 16, 2005 11:00 pm

Confused
-----------------------------------
this program writes the key to the registry but fails to write the value. 



 
#include  


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.

-----------------------------------
md
Thu Nov 17, 2005 3:11 am


-----------------------------------
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.

-----------------------------------
[Gandalf]
Thu Nov 17, 2005 3:56 pm


-----------------------------------
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.
