افزودن و حذف کردن یک برنامه به StartUp ویندوز از طریق کلیدهای رجیستری
کد:
using Microsoft.Win32;
کد:
private void AddStartUpKey(string _name, string _path)
{
RegistryKey key = Registry.LocalMachine.OpenSubKey
(@"Software\Micros oft\Windows\CurrentVersion\Run", true);
key.SetValue(_name, _path);
}
_name)
{
RegistryKey key = Registry.Lo
private void RemoveStartUpKey(strin
gcalMachine.OpenSubKey(@"Software\Micros oft\Windows\CurrentVersion\Run", true);
key.DeleteValue(_name, false);
}