I have a program that launches Elevated. From this program, I run other executables.
Now, by default, any process that I create will run at a higher level. Thus, for some programs it starts, I want them to start as if they were not raised as a standard user who is logged in.
The main elevated program runs under the user account of the registered user.
So this is what I tried
var psi = new ProcessStartInfo(Exe.GetExePath()); psi.UseShellExecute = false; psi.RedirectStandardError = false; psi.RedirectStandardInput = false; psi.RedirectStandardOutput = false; psi.WorkingDirectory = Exe.Version.GetInstallPath(); if(Exe.Elevated == false) { psi.UserName = Global.Username; var pass = new SecureString(); Global.Password.ToCharArray().ToList().ForEach(p => pass.AppendChar(p)); psi.Password = pass; } Process = Process.Start(psi);
This works because it does not increase in a running program. However, at that moment, it loses access to all mapped network drives for some odd reason.
I even tried to do something like this impersonating a Windows user from a launching application, and it also does not work.
So, I think I'm wondering how I can get reverse access to these mapped drives (all applications work under the correct user).
source share