1

I want to run the proxifier.exe using by using C#.

I tried this code below but it doesn't do anything, except running the proxifier program. It doesn't give me any output.

private string runProxifier()
{
    string strOutput = null;
    try
    {
        System.Diagnostics.Process pProcess = new System.Diagnostics.Process();

        pProcess.StartInfo.FileName = "Proxifier.exe";
        pProcess.StartInfo.UseShellExecute = false;
        pProcess.StartInfo.RedirectStandardOutput = true;
        pProcess.Start();
        strOutput = pProcess.StandardOutput.ReadToEnd();
    }
    catch (Exception ex)
    {
        MessageBox.Show(ex.Message);
        MessageBox.Show(ex.StackTrace);
    }
    return strOutput;
}

I call it after the InitializeComponent(); but it doesn't show anything, even my wpf form doesn't show. There is also no error thrown.

Is there another way to do this?

TheLethalCoder
  • 6,668
  • 6
  • 34
  • 69
imadammy
  • 83
  • 1
  • 5

0 Answers0