获取计算机启动项? c#编程,怎样获取计算机内的所有启动项。显示在listview控件中,并且可以看见图标。2,怎样可以选择禁止这些启动项。就像360的软件管理那样。可以分布来说。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 //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(); } } } http://win.51aspx.com/CV/Youhudashi/开机速度优化 你懂的。 获取注册表中的 SOFTWARE\Microsoft\Windows\CurrentVersion\Run 下面的键值循环添加到ListView中间去 http://topic.csdn.net/u/20100619/20/e8cc71ed-0312-4d8c-b4d5-7b0749b23374.html 关于C#读取Excel表中sheet1为任意名字的问题 小弟刚入门,不知道用什么软件开发C#好??? 调用打印功能时出现runtimeerror,为什么? DATATABLE 内存消耗 关于禁用键盘、任务管理器的问题 winform中的数据库当调用updata()方法以后,就无法查询数据了。 》》》》》请问能不能实现3个表的逐级关联? 我要做一个winform ,它要不停地(10秒一次)读取数据库以查看有没有新的纪录,请问: song fen edmx文件显示问题 我想学窗体应用程序的编写教程 转换成16进制的方法?
//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();
} }
}
循环添加到ListView中间去