5
I have a Console Application in which I use to run routines of my system. I am running this console from the Task Scheduler, every time it runs it flashes on the screen. It opens, executes the process and closes. I don’t want the console to appear on the screen, I just want it to run.
How do I do that?
Note: The application needs to be a Console Application, so the option to change the properties from PROJ to Windows Application is out of the question.
Why not create a windows service?
– Marconi
This is an interesting link. http://stackoverflow.com/a/3571628/4190610
– Jéf Bueno
@Marconi The company needs it to be a console app
– Jonathan Barcela
@jbueno I already tested the test link example, and even then the Console flashes on the screen.
– Jonathan Barcela
@Jonathanbarcela I get it.
– Marconi
@Jonathanbarcela because the company needs it? These requirements seem to be artificial.
– Maniero
@Bigown I don’t think that needs interfere with solving the problem, but come on. I am trying to do what I was given, create a console application for the execution of the administrative routines of the system. This Console app will be used by another system, which monitors these routines (in more than one module) in which picks exceptions, etc... that are shown in the control room. For this reason it cannot be a service and also needs to run in background.
– Jonathan Barcela
You can recompile the code and switch to Windows Forms application?
– Guilherme Nascimento
@Jonathanbarcela It matters because the whole solution is wrong.
– Maniero
@Guilhermenascimento As quoted in the question, no. :/
– Jonathan Barcela
@bigown I have to work with the tools that are available to me, unfortunately.
– Jonathan Barcela
@Jonathanbarcela in this case does not have because you will create the application, can create the way you want. But okay, want to do Gambi, do,
– Maniero
This is strange and very confusing :( - What do you think differs in the end result o Windows Forms application of Console for you?
– Guilherme Nascimento
Is not flashing the console also a requirement? If it is, it seems that they are asking incompatible things. There is no one in the company with whom you can debate this matter?
– bfavaretto
I think the problem lies in the question. The real problem is not the application having the window, but how to make the scheduler run without showing this window. Have you tried the option to "run hidden" from the scheduler? http://i.stack.Imgur.com/lsued.jpg Alternatively, schedule with
cmd /c start /min SEUAPP
, is not the same thing as hidden, but is minimized in Taskbar.– Bacco