Re: How to: Launch A Console Appplication in Hidden Mode?



Execute it with a System.Diagnostics.Process. You can set the property
CreateNoWindow to false. You can also have it redirect standard output so
that you can send the text written out anywhere you want. Here's some code
from one of my VBA macros:

Dim p As System.Diagnostics.Process = New System.Diagnostics.Process
p.StartInfo.FileName = "myeditor"
p.StartInfo.WorkingDirectory = doc.Path
p.StartInfo.Arguments = Cmd$ & " " & doc.Name
p.StartInfo.UseShellExecute = False
p.StartInfo.RedirectStandardOutput = True
p.StartInfo.CreateNoWindow = True
p.Start()
p.WaitForExit()

Good luck.


-- Noah

"ESmith" <eliana_smith@xxxxxxxxxxx> wrote in message
news:eI1Ox2flGHA.4444@xxxxxxxxxxxxxxxxxxxxxxx
I want to create a small console application that essentially gets some
information and then launches a Windows Application. What I want to do is
have the console application launched in hidden mode - I know how to do
this from with a Windows Application by creating a Process and using
StartInfo, but how can I configure a console application to run in hidden
mode from startup?

TIA



.



Relevant Pages

  • Re: How to: Launch A Console Appplication in Hidden Mode?
    ... information and then launches a Windows Application. ... have the console application launched in hidden mode - I know how to do this ... from with a Windows Application by creating a Process and using StartInfo, ...
    (microsoft.public.dotnet.framework)
  • How to: Have a console mode application start-up in Hidden Mode?
    ... I want to create a small console application that essentially gets some ... information and then launches a Windows Application. ... have the console application launched in hidden mode - I know how to do this ... from with a Windows Application by creating a Process and using StartInfo, ...
    (microsoft.public.dotnet.general)
  • How to: Launch A Console Appplication in Hidden Mode?
    ... I want to create a small console application that essentially gets some ... information and then launches a Windows Application. ... have the console application launched in hidden mode - I know how to do this ... from with a Windows Application by creating a Process and using StartInfo, ...
    (microsoft.public.dotnet.framework)
  • Re: How to: Launch A Console Appplication in Hidden Mode?
    ... WinForms application that starts with Sub Main. ... information and then launches a Windows Application. ... have the console application launched in hidden mode - I know how to do ... but how can I configure a console application to run in hidden mode from ...
    (microsoft.public.dotnet.framework)
  • Re: CreateProcessAsUser - Process starts then exits
    ... Windows XP Media Center ... public Int32 dwX; ... public IntPtr lpReserved2; ... parent's console. ...
    (microsoft.public.win32.programmer.kernel)