PsExec远程运行GUI应用程序

use*_*403 5 c# user-interface psexec

我正在尝试使用PsExec远程启动GUI应用程序.

            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);
Run Code Online (Sandbox Code Playgroud)

这里的问题是该进程确实远程启动,但我看不到GUI.我只能在任务管理器中看到它.有没有办法在远程计算机上看到GUI

编辑1: *权限*

  1. Console.WriteLine(System.Environment.UserName.ToString());
  2. Console.WriteLine(Thread.CurrentPrincipal.Identity.Name.ToString());
  3. Console.WriteLine("当前winddentity"+ System.Security.Principal.WindowsIdentity.GetCurrent().Name.ToString());

如果我在开始进程之前执行上面的代码行,它会给出:

  • 管理员
  • 空白
  • DomainName\administrator
  • 我也使用远程计算机上的管理员帐户登录它.

    *InteractiveMode* 当我尝试使用cmd提示符中的开关-i时,它给出:进程退出,错误代码为-1073741502.在尝试使用C#执行时,它根本不做任何事情.至少没有例外!

    编辑结束1.

    Ale*_* K. 3

    假设您需要-i交互模式的正确权限。

    -i 运行程序,以便它与远程系统上指定会话的桌面进行交互。如果未指定会话,则进程在控制台会话中运行。

    info.Arguments = @"\\" + "<COmputerName>" + " -i " + @"""C:\Program F...
    
    Run Code Online (Sandbox Code Playgroud)