现在我想开发一个软件,要让他自动启动,不是把它拖到启动里面
用C#应该怎么写代码

解决方案 »

  1.   


    写入注册表:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
      

  2.   

    把它放到启动目录下
    或放在HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
      

  3.   

    用windows服务
    http://www.pconline.com.cn/pcedu/empolder/net/0505/613681.html
      

  4.   

    RegistryKey   Reg   =   Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run",true);   
    string   sFilePath   =   Application.ExecutablePath;   
    Reg.SetValue("名字",sFilePath);   
      

  5.   

    c#代码可以操作注册表
    添加这个就可以
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run 
      

  6.   

    就是写注册表
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run
      

  7.   

    写注册表:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run 
    或者写Windows服务,设成自动
      

  8.   

    写注册表咯
    RegistryKey  Reg  =  Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run",true);  
    string  sFilePath  =  Application.ExecutablePath;  
    Reg.SetValue("程序的名字",sFilePath);