Re: Redirecting sdtin, stdout, stderr from an already running process



ghandi wrote:
On Mar 2, 5:59 am, Jeroen Mostert <jmost...@xxxxxxxxx> wrote:
Jeroen Mostert wrote:

<snip>> A much simpler approach is to use impersonation, then use Process to
start the process regularly:
<snip>
This, finally, works on my system. Is it of use to you too?
Never mind, of course this doesn't work, and I'm a very sloppy tester.

Really, by this point, I can really only advise two courses of action:

- Give up and accept that there will be a window.
- After the process has started, use ugly code to find the window and hide
it manually.

Doing it "properly" is way, way more trouble than its worth.

> Thanks again for your time. I'll try a few more things and then try
one of the things you mentioned (probably give up and accept that
there will be a window). I was also looking at the new namespace
System.IO.Pipes. It has an AnonymousPipeServerStream that might be
useful.

If you don't mind the dependency on .NET 3.5 (since that's when they were introduced) then using the native pipe classes is definitely preferable to rolling your own. (I only recently discovered them myself, otherwise I would have recommended them.)

--
J.
.



Relevant Pages

  • Re: [vim] fullscreen (Was: [gvim] colorschemes)
    ... [snip for space, been there, done that] ... Use command:WinFullScreen again (or move to another window or tab) ... To edit _vimrc I would right click on ohmster and then open ... But that's opening with vim, ...
    (comp.editors)
  • Re: new macbook- 1 week (plus a couple days) followup
    ... any numbers printed on the keyboard. ... If you want the window to stay the same size, ... lock icon in the bottom left when the window is the size you want. ...
    (comp.sys.mac.advocacy)
  • Re: new macbook- first impressions
    ... there is no apple menu in the intro video. ... - i have the newsgroups window open, and a group window open, telling ... there are ways to force quit an app. ...
    (comp.sys.mac.advocacy)
  • Re: OE shortcomings - was Re: Aioe problems now...help is appreciated.
    ... then couldn't find that window again. ... Hamster is not a newsreader, ...
    (news.software.readers)
  • Re: Great SWT Program
    ... Ever seen Windows with a circular clock app running? ... like a window with slightly rounded ... documentation, it's a menu item or F1 keypress away, and it's ...
    (comp.lang.java.programmer)