I have a winforms application with Administrator permissions:
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
and i add the .exe to the register to run it on the start of windows:
RegistryKey registr = Registry.CurrentUser.OpenSubKey(@"SoftwareMicrosoftwindowscurrentversionRun", true);
registr.SetValue("MyApp", Application.ExecutablePath);
MyApp was added successfully to the register, but it was not auto-started.
Note: when i deleted the Administrator permissions, it was auto-started.
Any solution please?
question from:
https://stackoverflow.com/questions/65920239/autostart-app-with-administrator-permissions-is-notworking 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…