資源簡介
c# 設置程序開機運行 代碼
代碼片段和文件信息
//類名:EcanSystem
//作用:系統(tǒng)設置及其他
//作者:劉典武
//時間:2010-12-05
using?System;
using?System.Collections.Generic;
using?System.Text;
using?Microsoft.Win32;
using?System.Diagnostics;
using?System.Runtime.InteropServices;
using?System.Windows.Forms;
using?System.Drawing;
namespace?Ecan
{
????public?class?EcanSystem
????{
????????///?
????????///?設置程序開機運行
????????///?
????????///?是否開機運行
????????///?要運行的EXE程序名稱(不要拓展名)
????????///?要運行的EXE程序路徑
????????///?成功返回真,否則返回假
????????public?bool?runWhenStart(bool?started?string?exeName?string?path)
????????{
????????????RegistryKey?key?=?Registry.LocalMachine.OpenSubKey(“SOFTWARE\\Microsoft\\Windows\\CurrentV
- 上一篇:c# 常用基本方法
- 下一篇:漂亮簡潔的抽獎程序源碼 含自繪窗體
評論
共有 條評論