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

VB6 Command Line Help: Difference between revisions

From Catcliffe Development
Jump to navigation Jump to search
(Created page with "category:VB6 == VB6 Command Line Options == <code> VB6[.EXE] [[{/run | /r}] | [/runexit] | [{/make | /m} projectname] [/out filename] [/outdir path] [/d const=value[:constN=valueN]] [/mdi | /sdi] [/cmd argument | /c argument]] </code> === Options === ; /run or /r projectname : Tells Visual Basic to compile projectname and run it, using the arguments stored in the Command Line Arguments field of the Make tab of the Project Properties dialog box. ; /runexit project...")
 
mNo edit summary
 
Line 1: Line 1:
[[category:VB6]]
[[category:VB6]]
== Visual Basic 6 Command Line Options ==
<div style="float:right; width:425px;">
__TOC__
</div>
The Visual Basic 6 IDE supports several command line switches for compiling, running, and configuring projects from a terminal or script.
=== Command Syntax ===
<syntaxhighlight lang="text">
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]
</syntaxhighlight>
=== Options ===
{| class="wikitable"
! Switch
! Parameters
! Description
|-
| <code>/run</code> or <code>/r</code>
| projectname
| Compiles the specified project and runs it using the arguments stored in the <b>Command Line Arguments</b> field on the <b>Make</b> tab of the Project Properties dialog.
|-
| <code>/runexit</code>
| projectname
| Compiles and runs the project. Visual Basic exits automatically when the program returns to design mode.
|-
| <code>/make</code> or <code>/m</code>
| projectname
| Compiles the project and produces an executable using the settings stored in the project file.
|-
| <code>/out</code>
| filename
| Sends build errors to the specified file when using <code>/make</code> or <code>/runexit</code>. If omitted, errors appear in a message box.
|-
| <code>/outdir</code>
| path
| Specifies the directory where output files are written when building with <code>/make</code>.
|-
| <code>/d</code> or <code>/D</code>
| const=value[:constN=valueN]
| Defines conditional compilation constants used when creating an EXE or ActiveX component. Multiple constants are separated by colons.
|-
| <code>/cmd</code> or <code>/c</code>
| argument
| Places the argument into the <b>Command Line Arguments</b> field of the project properties. This switch must be the last argument on the command line.
|-
| <code>/mdi</code> or <code>/sdi</code>
| —
| Sets the Visual Basic IDE to Multiple Document Interface (MDI) or Single Document Interface (SDI) mode.
|}
=== Example Usage ===
Compile and create an executable:
<syntaxhighlight lang="text">
VB6.EXE /make MyProject.vbp
</syntaxhighlight>
Compile and run a project:
<syntaxhighlight lang="bat">
VB6.EXE /run MyProject.vbp
</syntaxhighlight>
Compile with conditional constants and capture build errors:
<syntaxhighlight lang="bat">
VB6.EXE /make MyProject.vbp /d DEBUG=1:TRACE=1 /out build_errors.txt
</syntaxhighlight>
Build and place output files in a specific directory:
<syntaxhighlight lang="bat">
VB6.EXE /make MyProject.vbp /outdir C:\Builds
</syntaxhighlight>
=== Notes ===
* A **group name** may be used in place of a project name in any of the switches above.
* When using <code>/cmd</code> or <code>/c</code>, it must be the **final switch** on the command line.
[[Category:Visual Basic 6]]
[[Category:Build Tools]]
[[Category:Command Line Reference]]
<HTML><!--
== VB6 Command Line Options ==
== VB6 Command Line Options ==


Line 35: Line 128:


You may use a group name in place of projectname in any of the above switches.
You may use a group name in place of projectname in any of the above switches.
--></html>

Latest revision as of 13:52, 9 March 2026

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.