Back to Home page

NoConsole

NoConsole.exe is a simple tool that executes console application without console window. Console window isn't created instead of creating hidden window as some applications do. All standard handles like StdIn, StdOut and StdErr are redirected to NUL device. Created child process inherit parent process priority. Child process exit code is returned if child process was created otherwise GetLastError() function value is returned as exit code.

This tool works under Windows NT/2K/XP/2003.
Download binary or source.

Usage

Just run NoConsole.exe with command to execute as parameter. No special parameters required. For example:

NoConsole.exe cmd.exe /C dir /S c:\*

If you want to run process with different priority use START command:

START /LOW /WAIT NoConsole.exe cmd.exe /C dir /S c:\*

Why another tool?

I'm using this application to run batch files from Task Scheduler without stupid console window. Because NoConsole.exe returns child process exit code this code may be seen at status window of Task Scheduler.

There are few other similar tools on the web but none of them do exactly what I want:

If you have Windows XP SP2 or Windows 2003 the easiest way to run batch scripts without console window is to create job running as NT AUTHORITY\SYSTEM user.  Windowed application running at system account doesn't display any window because windows are created on different (hidden) desktop. So if you have Windows XP SP2/2003 you may forget about NoConsole.exe.

Compiling

Binary was created using Microsoft Visual C++ Toolkit and SCons. Dev-C++ IDE project file is included also.

Any other C compiler able to create Windows application may be used. The only file you need to compile and link is NoConsole.c.

Contact: roed@poczta.onet.pl