Click here to Skip to main content
15,907,497 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am writing a code to submit values in registry
but is not working :/
C#
RegistryKey key = Registry.LocalMachine.OpenSubKey("Software", true);

                key.CreateSubKey("Registration");
                key = key.OpenSubKey("Registration", true);


                key.CreateSubKey("AppVersion");
                key = key.OpenSubKey("AppVersion", true);

                key.SetValue("Registerd", "yes");
                MessageBox.Show("created");

Could u please sort out this...???
thanx
Posted
Updated 2-Jul-13 1:08am
v2

C#
const string keyName = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Registration";

Registry.SetValue(keyName,"Registration","True")
Registry.SetValue(keyName,"AppVersion","True")
Registry.SetValue(keyName,"Registered","yes")
 
Share this answer
 
I sort out it ,,,
there exists 32-bit and 64-bit Application Data in the Registry
Go to Wow6432Node under Softwares directory and check out here :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900