run console apps without a gui window?

office politics

It's all just 1s and 0s
Messages
6,555
Location
in the lab
is there a command that can be used to hide a gui windows when running console apps on windows?

we have a .net console that runs on a schedule and if we're on the server it pops up a box when it runs. slightly annoying so 'd like to prevent the box from appearing if possible.
 
If you have access to the source code you can change it :p.

Otherwise... not that I'm aware of if it's just a regular console EXE.
 
actually .... I do have access to the source code for this particular exe. but I don't know how to go about preventing the console window from opening, even with the source. I created it in c# with .net framework.

I know I could write a vbs to use windows shell run command. it has a parameter for window style and a value for hiding the windows. I'm surprised cmd.exe doesn't have a option for this.

WSH >> wshshell >> Run | DevGuru
 
Last edited:
Couple options:
Use PINVOKE: Hide Console Window in C# Console Application

Changing it to a Windows app instead of Console app (this thread also has a suggestion of changing it to a C# service rather than an application): .net - Hide Console Window in C# Console Application - Stack Overflow

Or if you're starting a process from the console app (this has a Window style you can set to Hidden, like you said you can do in VB): http://stackoverflow.com/questions/...p-console-application-with-the-console-hidden
 
Back
Top Bottom