CHP.EXE (Create Hidden Process)

Synopsis

CHP.EXE is a very simple program utilising the Win32 CreateProcess API to silently launch GUI and console apps in a hidden window. CHP is free open source software.

Usage

CHP yourapp arg1 arg2 arg3 ...

Prefix your original commandline with CHP.

For example:-

CHP notepad <-- runs notepad.exe in a hidden window
CHP notepad /p "New Text Document.txt" <-- silently prints a text file
CHP cmd.exe /c ""d:\my batch file.cmd" arg1 "arg two"" <-- runs a batch file in a hidden window

Exit Status

If CHP succeeds, its exit status is the process ID (PID) of the newly created process.

If CHP fails to create the specified process, its exit status is the Win32 error code that caused the failure, multiplied by -1. Use the "NET HELPMSG" command to obtain the meaning of the error code.

CHP also writes its exit status to stdout. However, because CHP is a windowless GUI application this output will not be visible unless it's piped into a program that writes own stdin to stdout (the MORE command is ideal). For example, in a cmd.exe shell:-

CHP notepad | more

Compiling

This package includes a pre-compiled binary, but if you want to compile
CHP yourself, I recommend either of the following free IDE's:-

Note: The source should be compiled as a GUI (not a console) application.

Note from "Johan" -- If using Visual Studio to compile for Win64, change "main" to "WinMain" in the "main.c" and compile with the /link /SUBSYSTEM:WINDOWS option.

Download

Package MD5SUM Release Date Platform Notes
chp-0.1.1.13.zip chp-0.1.1.13.MD5SUM.txt 0.1.1.13 2007-10-28 Win32 includes pre-compiled binary and source code

Licensing

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or(at your option) any later version.

-- Ritchie

Valid HTML 4.01 Strict