• C#访问注册表


    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using Microsoft.Win32;
    using System.Security.Permissions;

    namespace RemoveTransReg
    {
        class Program
        {
            static void Main(string[] args)
            {
                string[] strArrRemovedCLSID = new string[15];
                strArrRemovedCLSID[0] = "bbb";

                string strCLSID = "CLSID";
                RegistryKey regKeyCLSID = Registry.ClassesRoot.OpenSubKey(strCLSID,  RegistryKeyPermissionCheck.ReadWriteSubTree);

                foreach(string strSubKey in strArrRemovedCLSID)
                {           
                    regKeyCLSID.DeleteSubKeyTree(strSubKey);
                }            

                regKeyCLSID.Close();        
            }
        }
    }
  • 相关阅读:
    c#配置文件
    C#预处理指令
    C#面向对象详解
    231. Power of Two
    226. Invert Binary Tree
    C语言函数入参压栈顺序为什么是从右向左?
    对C++ 虚函数的理解
    悲观锁和乐观锁
    什么是索引
    CHAR 和VARCHAR的区别
  • 原文地址:https://www.cnblogs.com/taoxu0903/p/1572940.html
Copyright © 2020-2023  润新知