在做个项目中由于需要对注册表从操作,特写了以下遍历注册表程序
using System;
using Microsoft.Win32;
using System.Diagnostics;
namespace IVR
{
/// <summary>
/// Class1 的摘要说明。
/// </summary>
class Class1
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)
{
//
// TODO: 在此处添加代码以启动应用程序
//
RegistryKey key = Registry.LocalMachine.OpenSubKey("SOFTWARE", true);
Access_Registry(key,"UltraEdit"); //UltraEdit是自己要对某个程序注册表主目录
}
private static void Access_Registry(RegistryKey keyR,String str)
{
string[] subkeyNames;
string[] subvalueNames;
using System;
using Microsoft.Win32;
using System.Diagnostics;
namespace IVR
{
/// <summary>
/// Class1 的摘要说明。
/// </summary>
class Class1
{
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)
{
//
// TODO: 在此处添加代码以启动应用程序
//
RegistryKey key = Registry.LocalMachine.OpenSubKey("SOFTWARE", true);
Access_Registry(key,"UltraEdit"); //UltraEdit是自己要对某个程序注册表主目录
}
private static void Access_Registry(RegistryKey keyR,String str)
{
string[] subkeyNames;
string[] subvalueNames;