My problem is simple. I can't find both problem's solutions together. My question about launch my program at startup with admin permission without warning. I just want to get admin rights on setup. I'm using regedit for launching my program at startup its working without admin rights. If i try to give admin rights on app manifest, program isn't launching at startup. How should i solve this ? Also program need a gui so i can't use services. Thanks for the help.
There are my startup codes
private void SetStartup()
{
RegistryKey rk = Registry.CurrentUser.OpenSubKey
("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);
if (chkStartUp.Checked)
{
rk.SetValue("_connectorEthernet", Environment.CurrentDirectory + @"\_connectorEthernet");
WriteToSettingFile("true");
}
else
{
rk.DeleteValue("_connectorEthernet", false);
WriteToSettingFile("false");
}
}