Search code examples
c#powershelllocal-network

Popup dialog from server to remote computer in local network


I'm trying to popup a dialog with some questions from a local network server and receive the users answers, something like a winforms window, using c#. Are there any recommendations for a way of doing this?


Solution

  • The solution I found was using PsExec tools.

    var proc = new Process
            {
                StartInfo = new ProcessStartInfo
                {
                    FileName = "path of psExec",
                    Arguments = $"psexec -i -s  \\\\{machineName} {path}",
                    UseShellExecute = false,
                    RedirectStandardOutput = true,
                    CreateNoWindow = true
                }
            };
    
            proc.Start();
            proc.WaitForExit();`