If you have a non interactive console application, let it be an invisible application, you can always generate logs for troubleshooting. If you want to run a console application without console pop-ups, from startup folder or ‘Run’ registry key, you need to make following changes to the console project. The basic idea is to make your console project a windows application.
Step 1:
Go to Project Properties -> C/C++ ->Preprocessor.
Replace _CONSOLE with _WINDOWS.
Step 2:
Go to Project Properties-> Linker -> Subsytem.
Replace Console (/SUBSYSTEM:CONSOLE) with Windows (/SUBSYSTEM:WINDOWS).
Step 3:
Replace _tmain()/main() with WinMain(). If your console application uses command line arguments you need to make appropriate changes for WinMain().
Step 4:
Build and run the application, it will do the same operations, however, without any console pop-up.
Monday, May 4, 2009
Subscribe to:
Post Comments (Atom)

0 comments:
Post a Comment