I am trying to launch a GUI application remotely using PsExec.
ProcessStartInfo info = new ProcessStartInfo(@"<path to dir>");
info.FileName = @"C:\<dirpath>\PsExec.exe";
info.Arguments = @"\\" + "<COmputerName>" + " " + @"""C:\Program Files (x86)\<exepath>\<exename>.exe""";
info.RedirectStandardOutput = true;
info.UseShellExecute = false;
info.RedirectStandardError = true;
info.WindowStyle = ProcessWindowStyle.Maximized;
Process o = Process.Start(info);
The issue here is that the process does launch remotely, but I cannot see the GUI. I can only see it in task manager. Is there a way to see the GUI on the remote computer?
EDIT 1: *Permissions*
- Console.WriteLine (System.Environment.UserName.ToString());
- Console.WriteLine(Thread.CurrentPrincipal.Identity.Name.ToString());
- Console.WriteLine ("current winddentity " + System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString());
If I execute above lines of code before starting process, it gives:
*InteractiveMode* When I try to use the switch -i from the cmd prompt it gives: Process exited with error code -1073741502. While trying to execute using C#, it doesnt do anything at all. No exception at least!
END OF EDIT 1.