注册表中写到以下其中之一的一个键:
HKLM\Software\Microsoft\Windows NT\CurrentVersion\Winlogon\userinit 或
HKLM\Software\Microsogt\Windows NT\CurrentVersion\Winlogon\Shell 或
HKLM\Software\Microsogt\Windows\CurrentVersion\Run 或
HKLM\Software\Microsogt\Windows\CurrentVersion\RunOnce 或
HKLM\Software\Microsogt\Windows\CurrentVersion\RunOnceEx 或
HKLM\Software\Microsogt\Windows\CurrentVersion\Runservices 或
HKLM\Software\Microsogt\Windows\CurrentVersion\RunservicesOnce
示例:
using Microsoft.Win32;
string strKey = @"SOFTWARE\Microsoft\Windows\CurrentVersion\Run";
string strFilePath = Application.ExecutablePath ;
RegistryKey regKey = Registry.LocalMachine.OpenSubKey(strKey , true);
if(regKey != null)
{
regKey.Setvalue("cti",strFilePath);
}





2007-5-27 21:54 


楼上的大哥,教教我吧