- 51Aspx源码必读.txt[3KB]
- ExitWindows.cs[5KB]
- Form1.cs[4KB]
- Form1.Designer.cs[8KB]
- Form1.resx[276KB]
- IniOP.cs[8KB]
- Program.cs[486B]
- reset.csproj[3KB]
- d (3).ico[89KB]
- from.gif[4KB]
- reset.sln[851B]
- 最新Asp.Net源码下载.url[123B]
源码介绍
WPY电脑定时重启工具源码
源码描述:
服务器的重启,需要API来实现。共享此案例,希望多交流。
//将程序的开机启动写入注册表
private void register()
{
string starupPath = Application.ExecutablePath;// Mydir("verro.exe");//
//class Micosoft.Win32.RegistryKey. 表示Window注册表中项级节点,此类是注册表装.
RegistryKey loca = Registry.LocalMachine;
RegistryKey run = loca.CreateSubKey(@"SOFTWARE\Microsoft\Windows\CurrentVersion\Run");
try
{
run.SetValue("ResetWin", starupPath);
MessageBox.Show("开机启动设置成功!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
loca.Close();
run.Close();
}
catch (Exception ee)
{
MessageBox.Show(ee.Message.ToString(), "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
下单记录
用户名 | 源码评分 | 成交价 | 下单时间 | 订单状态 |
---|