摘要: 宿舍的肥仔每次开机就需要运行多个程序,他希望一个程序实现这些事情,所以写了个程序,大家有什么意见可以给我提出来,我会多加修改,谢谢,贴上源码:using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using System.Diagnostics;using System.IO;namespace 懒人程序{ public partial 阅读全文
posted @ 2011-03-08 11:18 水木 阅读(683) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 开机启动项 /// </summary> /// <param name="Started">是否启动</param> /// <param name="name">启动值的名称</param> /// <param name="path">启动程序的路径&a 阅读全文
posted @ 2011-03-08 10:58 水木 阅读(275) 评论(0) 推荐(0) 编辑
摘要: public static bool SetAutoRun(string keyName,string filePath) { try { RegistryKey runKey=Registry.LocalMachine.OpenSubKey(@"\SOFTWARE\Microsoft\Windows\CurrentVersion\Run",true); runKey.SetValue(keyName,filePath); runKey.Close(); } catch { return false; } return true; }test: SetAutoRun(&qu 阅读全文
posted @ 2011-03-08 10:56 水木 阅读(257) 评论(0) 推荐(0) 编辑