i want to run pstool from windows form. i tried the code:
System.Diagnostics.Process process = new System.Diagnostics.Process();
System.Diagnostics.ProcessStartInfo startInfo = new System.Diagnostics.ProcessStartInfo();
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Normal;
startInfo.FileName = "cmd.exe";
startInfo.Arguments = @"C:\\PSTools\\PsExec.exe \\\\" + dnsName+" CMD";
process.StartInfo = startInfo;
process.Start();
but it open the command lint and not running the command:"C:\PSTools\PsExec.exe \\" + dnsName+" CMD"
what am i doing wrong?