c#编程,怎样获取计算机内的所有启动项。显示在listview控件中,并且可以看见图标。2,怎样可以选择禁止这些启动项。就像360的软件管理那样。可以分布来说。

解决方案 »

  1.   


    //C# 获取系统启动项
    using System; 
    using System.Collections.Generic; 
    using System.ComponentModel; 
    using System.Data; 
    using System.Drawing; 
    using System.Text; 
    using System.Windows.Forms; 
    using Microsoft.Win32; namespace WindowsApplication3 

    public partial class Form1 : Form 

    public Form1() 

    InitializeComponent(); 
    foreach (string name in GetRegistName()) 

    this.label1.Text += name + ":" + GetRegistData(name) + "\r\n"; 

    } private string GetRegistData(string name) 

    string registData; 
    RegistryKey hkml = Registry.LocalMachine; 
    RegistryKey aimdir = hkml.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true); 
    registData = aimdir.GetValue(name).ToString(); 
    return registData; 
    } private string[] GetRegistName() 
    { RegistryKey hkml = Registry.LocalMachine; 
    RegistryKey aimdir = hkml.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run", true); 
    return aimdir.GetValueNames(); 
    } } 
    }
      

  2.   

    http://win.51aspx.com/CV/Youhudashi/开机速度优化  你懂的。
      

  3.   

    获取注册表中的 SOFTWARE\Microsoft\Windows\CurrentVersion\Run 下面的键值
    循环添加到ListView中间去
      

  4.   

    http://topic.csdn.net/u/20100619/20/e8cc71ed-0312-4d8c-b4d5-7b0749b23374.html