> I have a console app which is simply called from another app which passes a
filename to it for processing. It does not display anything or require any
input. All errors are sent to the eventlog.
As this app is really just a wrapper for a class library I don't need it
"popping" up on the console and would like it to be either invisible or for
the console window to run minimized in the taskbar.
I run an exe file without a window as follows:
Dim p As New Process
With p.StartInfo
.FileName = "yourprogname.exe"
.Arguments = "yourfilename"
.UseShellExecute = False
.RedirectStandardError = True
.RedirectStandardInput = True
.RedirectStandardOutput = True
.WindowStyle = ProcessWindowStyle.Hidden
.CreateNoWindow = True
End With
Try
p.Start()
's = p.StandardOutput.ReadToEnd()
'p.WaitForExit()
Catch ex As Exception
's = ex.ToString
End Try
Toward the end, a few lines are commented out. These lines read stdout of
the launched program and cause the launching program to wait for completion.
If you want to launch and forget, then leave them out.