惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
有赞技术团队
有赞技术团队
Hugging Face - Blog
Hugging Face - Blog
罗磊的独立博客
S
SegmentFault 最新的问题
D
Docker
博客园 - 司徒正美
雷峰网
雷峰网
V
Visual Studio Blog
云风的 BLOG
云风的 BLOG
G
Google Developers Blog
The GitHub Blog
The GitHub Blog
A
About on SuperTechFans
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园 - Franky
月光博客
月光博客
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
T
The Blog of Author Tim Ferriss
Google DeepMind News
Google DeepMind News
MyScale Blog
MyScale Blog
MongoDB | Blog
MongoDB | Blog

博客园 - Hover

找出隐藏的字符 - Hover - 博客园 GZIP压缩导致无法输出缓冲区内容。 asp.net 开发WAP MFC 试图执行系统不支持的操作 VC2005 无法打开RC文件.提示Opened in another editor DIALOG Undeclared identifier 找回VISUAL STUDIO 2005丢失的模板 用OD和CE结合跟踪查找基址 [转]OD 跟踪调试经验 查看发包数据bp Send 修改boot.ini使W3wp使用更多的物理内存 查找游戏帐号 查找选中怪ID相对于基址的偏移 提醒精灵.NET 发布 简单地址重写 使用.NET Reflector插件FileDisassembler还原源码! ASP输出WOrd、Excel文件! (小技巧八)计算字符串的长度 修改Windows 2003 的默认上传文件大小!
(小技巧九)设置开机运行功能
Hover · 2006-05-22 · via 博客园 - Hover

开机运行有种方式实现其功能。这里用的是使用注册表的方式实现此功能
using Microsoft.Win32; //注册表需要引用此命名空间

 1  RegistryKey key = Registry.CurrentUser.OpenSubKey(@"Software\Microsoft\Windows\CurrentVersion\Run"true);
 2
 3            if (CBAutoRun.Checked)
 4            {
 5                key.SetValue("EventAgent", Application.ExecutablePath);
 6            }

 7            else
 8            {
 9                 key.SetValue("EventAgent""");
10               }

CheckBox选中写注册表。否清空EventAgent键值