C#/Winform
(.NET) 시작프로그램에 등록하기
kjun.kr
2017. 4. 15. 14:29
728x90
using Microsoft.Win32;
private void SetStartup()
{
RegistryKey rkey = Registry.CurrentUser.OpenSubKey
("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
if (checkBox.Checked)
rkey.SetValue("ProgramName", Application.ExecutablePath.ToString());
else
rkey.DeleteValue("ProgramName", false);
private void SetStartup()
{
RegistryKey rkey = Registry.CurrentUser.OpenSubKey
("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
if (checkBox.Checked)
rkey.SetValue("ProgramName", Application.ExecutablePath.ToString());
else
rkey.DeleteValue("ProgramName", false);
728x90