Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. System.Diagnostic.Process question/problem

System.Diagnostic.Process question/problem

Scheduled Pinned Locked Moved C#
helpquestionlinux
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • X Offline
    X Offline
    XRaheemX
    wrote on last edited by
    #1

    I'm having a bit of a problem getting this to work. I am writing an application that is using a StreamReader to read the output of a shell process. Here is the code to launch the process: Process p = new Process(); p.StartInfo.Arguments = "-n 1 -w 200 " + ip; p.StartInfo.FileName = "ping.exe"; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.UseShellExecute = false; p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; p.Start(); The problem I'm having is that ProcessWindowStyle.Hidden seems to do nothing when UseShellExecute is = false. A (blank) console window still comes up for every IP address I'm trying to ping. Everything else works fine except the hiding of the window. I haven't been able to find anybody else that seems to be having this same issue out there. Any clues?

    T 1 Reply Last reply
    0
    • X XRaheemX

      I'm having a bit of a problem getting this to work. I am writing an application that is using a StreamReader to read the output of a shell process. Here is the code to launch the process: Process p = new Process(); p.StartInfo.Arguments = "-n 1 -w 200 " + ip; p.StartInfo.FileName = "ping.exe"; p.StartInfo.RedirectStandardOutput = true; p.StartInfo.UseShellExecute = false; p.StartInfo.WindowStyle = ProcessWindowStyle.Hidden; p.Start(); The problem I'm having is that ProcessWindowStyle.Hidden seems to do nothing when UseShellExecute is = false. A (blank) console window still comes up for every IP address I'm trying to ping. Everything else works fine except the hiding of the window. I haven't been able to find anybody else that seems to be having this same issue out there. Any clues?

      T Offline
      T Offline
      therealmccoy
      wrote on last edited by
      #2

      I used: p.CreateNoWindow = true; www.lovethosetrains.com

      X 1 Reply Last reply
      0
      • T therealmccoy

        I used: p.CreateNoWindow = true; www.lovethosetrains.com

        X Offline
        X Offline
        XRaheemX
        wrote on last edited by
        #3

        Excellent.. I feel so stupid now. Thanks for your response, worked like a charm.

        T 1 Reply Last reply
        0
        • X XRaheemX

          Excellent.. I feel so stupid now. Thanks for your response, worked like a charm.

          T Offline
          T Offline
          therealmccoy
          wrote on last edited by
          #4

          Just glad that I can actually be of help. www.lovethosetrains.com

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups