获取Windows中的所有启动过程

时间:2015-06-09 13:22:10

标签: c# windows startup

我想列出使用c#在Windows启动时运行的所有进程。我试过了代码

string keyPath = @"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run";       
RegistryKey key = 
      Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
key.GetValueNames()
key.GetValue(Processname).toString()

这段代码给了我一些启动项,我可以在任务栏启动时看到,但不是所有项目。

使用Windows 8.1 64位

1 个答案:

答案 0 :(得分:0)

在Windows中启动程序的方法很多。至少你还应该检查两个配置单元中的HKCU(当前用户)注册表配置单元和RunOnce,RunOnceEx子项。