* Main.prg LPARAMETERS tcBatchMode LOCAL llBatchMode IF PCOUNT( ) < 1 * No parameters passed: llBatchMode = .F. ELSE llBatchMode = ( UPPER( tcBatchMode ) == "T" ) ENDIF * Later on save the value of llBatchMode to a global property or value2. You can then start your EXE with an optional parameter:
* Start in batch mode MyEXE.EXE T * Start in interactive mode MyEXE.EXE F * No passed parameter also results in interactive mode MyEXE.EXE3. Within your application you would need to wrap all dialogs e.g.
IF NOT llBatchMode * Do your dialog stuff here ENDIF