Contents in this wiki are for entertainment purposes only
This is not fiction ∞ this is psience of mind

VB6 Command Line Help

From Catcliffe Development
Jump to navigation Jump to search

Visual Basic 6 Command Line Options

The Visual Basic 6 IDE supports several command line switches for compiling, running, and configuring projects from a terminal or script.

Command Syntax

VB6.EXE [[{/run | /r} projectname] | [/runexit projectname] | [{/make | /m} projectname]]
        [/out filename]
        [/outdir path]
        [/d const=value[:constN=valueN]]
        [/mdi | /sdi]
        [/cmd argument | /c argument]


Options

Switch Parameters Description
/run or /r projectname Compiles the specified project and runs it using the arguments stored in the Command Line Arguments field on the Make tab of the Project Properties dialog.
/runexit projectname Compiles and runs the project. Visual Basic exits automatically when the program returns to design mode.
/make or /m projectname Compiles the project and produces an executable using the settings stored in the project file.
/out filename Sends build errors to the specified file when using /make or /runexit. If omitted, errors appear in a message box.
/outdir path Specifies the directory where output files are written when building with /make.
/d or /D const=value[:constN=valueN] Defines conditional compilation constants used when creating an EXE or ActiveX component. Multiple constants are separated by colons.
/cmd or /c argument Places the argument into the Command Line Arguments field of the project properties. This switch must be the last argument on the command line.
/mdi or /sdi Sets the Visual Basic IDE to Multiple Document Interface (MDI) or Single Document Interface (SDI) mode.

Example Usage

Compile and create an executable:

VB6.EXE /make MyProject.vbp

Compile and run a project:

VB6.EXE /run MyProject.vbp

Compile with conditional constants and capture build errors:

VB6.EXE /make MyProject.vbp /d DEBUG=1:TRACE=1 /out build_errors.txt

Build and place output files in a specific directory:

VB6.EXE /make MyProject.vbp /outdir C:\Builds

Notes

  • A **group name** may be used in place of a project name in any of the switches above.
  • When using /cmd or /c, it must be the **final switch** on the command line.