private static void autorun()
{
const string name = "my_app";
string ExePath = Application.ExecutablePath;
RegistryKey reg;
reg = Registry.CurrentUser.CreateSubKey("Software\Microsoft\Windows\CurrentVersion\Run\");
reg.SetValue(name, """ + ExePath + "" /hide");
reg.Close();
}