首页  编辑  

读取当前启动项

Tags: /C#/注册表读取/   Date Created:

using Microsoft . Win32;

RegistryKey vRegistryKey = Registry . CurrentUser . OpenSubKey(

    @"Software\Microsoft\Windows\CurrentVersion\Run" );

string [] ValueNames = vRegistryKey . GetValueNames();

foreach (string vValueName in ValueNames)

   TextBox1 . AppendText(string . Format( "{0}={1}\r\n" ,

       vValueName, vRegistryKey . GetValue(vValueName)));