When I tried to use code below to launch a high privilege process from a low one,a uac popout and the something.exe(C# console app with some dll) stucks without giving any output or error, and ocupying quite some cpu.Everything is fine if I run the Something.exe by right clicking it and run as administrator.Why??? I have tried Fody.Costura or set the workingdirectory but the problem wasn't solved(seems not a dll issue). I am using .net core6 and windows app sdk 1.2.230217.4
Process P = new Process();
P.StartInfo.UseShellExecute = true;
P.StartInfo.Verb = "runas";
P.StartInfo.FileName = ApplicationHelper.GetFullPathToExe() + "\\Win64\\SomeThing.exe";
P.StartInfo.Arguments = msg;
P.Start();
This is what worked for me: