I dont know about .Net, but MFC implements the following: BOOL CSetupApp::InitInstance() { // Standard initialization // If you are not using these features and wish to reduce the size // of your final executable, you should remove from the following // the specific initialization routines you do not need. #ifdef _AFXDLL Enable3dControls(); // Call this when using MFC in a shared DLL #else Enable3dControlsStatic(); // Call this when linking to MFC statically #endif CSetupDlg dlg; m_pMainWnd = &dlg; if(stricmp(m_lpCmdLine, "-f") == 0) dlg.ForceInstall = TRUE; else dlg.ForceInstall = FALSE; int nResponse = dlg.DoModal(); if (nResponse == IDOK) { // TODO: Place code here to handle when the dialog is // dismissed with OK } else if (nResponse == IDCANCEL) { // TODO: Place code here to handle when the dialog is // dismissed with Cancel } // Since the dialog has been closed, return FALSE so that we exit the // application, rather than start the application's message pump. return FALSE; } for dialog based apps. ie, there is an inbuilt command line to the app, that you can handle, and choose to create the dialog or, in your case, just print to standard out. Perhaps .Net has a similar mechanism.
Truth is the subjection of reality to an individuals perception