plz help me..!
Registry value
How I set Registry value in my registry?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Tanmay SarkarPosted Jul 29, 2010, 11:38 PM
Try this code....
using Microsoft.Win32;
private void button1_Click(object sender, EventArgs e)
{
try
{
RegistryKey regkey = Registry.CurrentUser;
regkey = regkey.CreateSubKey (@"Software\Tanmay\Sample"); //path
if (regkey != null)
{
regkey.SetValue("Test", "Hello World"); //Value Name,Value Data
}
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
Mark it as answer if it help you.
Thank you.
Tanmay SarkarPosted Jul 30, 2010, 11:32 PM
But after reading your post, i think world is complex. I visit your profile & few others member who support me in my problem, & i shocked to see some people also dislike them.
But i keep your word. And never mind that thumbs down vote....
But the person if he/she has better code can share with us!
Ok don't worry....
Thank you sir, thank you so much ....
[now you can see 11+me =12 are thumbs up for you] :-)
Sam HobbsPosted Jul 30, 2010, 10:02 PM
Don't worry about it, though; it happens. There are many unhappy people in the world and it is not your fault that they are unhappy.
If you look at my profile, 11 people voted thumbs up for me and 6 people voted thumbs down. If people voted thumbs down for me due to a misunderstanding, then I wish I could explain. I do sometimes tell people that they should search for answers, and people don't like that. Since I say things like that, I am not surprised that some people vote me down.
I don't see anything you have said that should offend anyone, so don't worry about it.
Tanmay SarkarPosted Jul 30, 2010, 12:43 PM
I asked those man who dislike this post please,
If there is better code please put it here we learn from that.
Thank you.