Jayce Ooi's Paradise

Technology, mobile, photography, gaming, programming, anything

How to read and write Windows System Registry Keys and Values? I need to create a value at Windows System Registry for my project lately. It is used for SCOM discovery. I need a Windows System Registry key to determine that the server is the server that SCOM going to monitor.

First thing to do in your C#. Add using Microsoft.Win32; RegistryKey and Registry requires Microsoft.Win32 as the assembly reference.

Here are the codes that write Windows System Registry Keys.

RegistryKey JayceOoiKey = Registry.LocalMachine.CreateSubKey(“SOFTWARE\\JayceOoi”);

This will create key JayceOoi under HKEY_LOCAL_MACHINE\SOFTWARE\.

To read Test string value from HKEY_LOCAL_MACHINE\SOFTWARE\JayceOoi\

string Output = JayceOoiKey.GetValue(“Test”);

These are the methods that I use to read and write Windows System Registry Keys and Values. Hope it will help in your programming work. ;)

Microsoft System Center Operations Manager 2007 (SCOM). Do you ever hear these words? Microsoft System Center Operations Manager 2007 is new to me. After doing some research at Microsoft website, I just know that Microsoft System Center Operations Manager 2007 is the replacement for Microsoft Operations Manager 2005 (MOM). What are SCOM and MOM anyway? There are management tool for IT build by Microsoft. SCOM has more features than MOM.

scom.gif
Microsoft System Center Operations Manager 2007

(more…)



SP Blogger