Advertisement

02.13.2008 at 06:45AM PST, ID: 23159667
[x]
Attachment Details

Change Registry Value using C#

Asked by hammdan_1980 in Microsoft Visual C#.Net

Hi,

I have desktop c# application, and when this application main frm loads i want to update some registry value to null ...
the regsitry value resided on:

HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\.Default\.Current

This key have default vallue as (%SystemRoot%\media\Windows XP Ding.wav)

And i  just want to replace it with null ! i tried this and didnt work !


Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
RegistryKey rkHKLM = Registry.CurrentUser; ;            
RegistryKey rkRun;
 
rkRun =
rkHKLM.OpenSubKey(@"HKEY_CURRENT_USER\AppEvents\Schemes\Apps\.Default\.Default\.Current", true);
 
rkRun.SetValue("Default", "");                      
Registry.CurrentUser.Flush();
[+][-]02.13.2008 at 07:00AM PST, ID: 20884656

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Microsoft Visual C#.Net
Sign Up Now!
Solution Provided By: jaime_olivares
Participating Experts: 2
Solution Grade: A
 
 
[+][-]02.13.2008 at 07:18AM PST, ID: 20884847

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.13.2008 at 07:43AM PST, ID: 20885095

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906