What are the Command Line options for the VB6 IDE (Compiler)
VB6
Information directly from running VB6.exe /?
:
Command Line Options
VB6[.EXE] [[{/run | /r}] | [/runexit] | [{/make | /m}] projectname] [/out filename] [/outdir path] [/d const=value{[:constN=valueN]}] [/mdi | /sdi] [{/cmd argument | /c argument}]
/run or /r projectname
Tells Visual Basic to compileprojectname
and run it, using the arguments stored in the Command Line Arguments field of the Make tab of the Project Properties dialog box.
/runexit projectname
Tells Visual Basic to compileprojectname
and run it. Visual Basic will exit when the project returns to design mode.
/make or /m projectname
Tells Visual Basic to compileprojectname
and make an executable file from it, using the existing settings stored in the project file.
/out filename
Specifies a file to receive errors when you build using /m or/runexit
. If you do not use /out, command line build errors are displayed in a message box.
/outdir path
Specifies a directory path to place all output files in when using /make.
/d or /D const=value...
Tells Visual Basic which values to use for conditional compilation constants when making an .EXE or ActiveX component with the /make switch. Separate multiple constants with colons.
/cmd or /c argument
Puts argument in the Command Line Arguments field in the Make tab of the Project Properties dialog box. When used, this must be the last switch on the command line.
/mdi
or/sdi
Changes the Visual Basic environment to either Single Document Interface (SDI) or Multiple Document Interface (MDI) mode. Visual Basic remains in this mode until you change it.You may use a group name in place of
projectname
in any of the above switches.
Sourced from here is some additional information which pertains to older versions of VB as well. That external page may eventually disappear.
VB Command Line Summary
All Versions
vb*[.exe] [[{/run | /r} projectname] {/make | /m } projectname] {/cmd argument | /c argument}]
projectname
The name of your project (.vbp) file.
/run
or/r
Tells Visual Basic to compile and runprojectname
using the arguments stored in the Command Line Arguments field of the Make tab of the Project Properties dialog box. You can run more than one project using this command. Replaceprojectname
withprojectgroupname
.
/make
or/m
Tells Visual Basic to compileprojectname
and make an executable (.exe) file, using the existing settings of thePath
,EXEName
, andTitle
properties of theAPP
object. You can compile and make an executable (.exe) file from more than one project using this command. Replace of theprojectname
withprojectgroupname
.
/cmd
or/c
Puts argument in the Command Line Arguments field in the Make tab of the Project Properties dialog box. When used, this must be the last switch on the command line.Versions 4 + Only
vb*[.exe] {/d compileconst} [{/makedll | /l} projectname]
/makedll
or/l
Tells Visual Basic to compile projectname and make an in-process ActiveX server (.dll) file from it.
/d
or/D
Tells Visual Basic which values to use for conditional compilation constants when making an .EXE with the /make switch or an ActiveX DLL with the/makedll
switch.
compileconst
The names and values of conditional compilation constants used in the project file.Version 5+ Only
vb*[.exe] [{/runexit} projectname][{/m} or {/runexit} projectname /out filename}][{/m}][/sdi] or [/mdi]
/runexit
Tells Visual Basic to run projectname. If for any reason the file is changed in the process of running, all changes are ignored and no dialog appears on exit to design mode.
filename
The name of the file to receive errors when you build an executable using the/m
or/runexit
option.
/out
Allows you to specify a file to receive errors when you build using the/m
or /runexit option. The first error encountered is placed in this file with other status information. If you do not use the /out option, command line build errors are displayed in a message box. This option is useful if you are building multiple projects.
/?
Lists the available Command Line arguments.
/sdi
Changes the Visual Basic environment to SDI (Single Document Interface) mode. Visual Basic remains in SDI mode until you change it. You can change to MDI mode by using the/mdi
argument or by clearing the SDI Development Environment option in the Advanced tab of the Options dialog box.
/mdi
Opens Visual Basic in MDI (Multiple Document Interface) mode. Visual Basic remains in MDI mode until you change it. You can change to SDI mode by using the/sdi
argument or by selecting the SDI Development Environment option in the Advanced tab of the Options dialog box. MDI mode is the default.
A bit of Google work suggests that such a list of options can be obtained by going to the directory containing vb6.exe in Command Prompt and running
vb6.exe /?
/make /outdir path
/run
/runexit
- Compile and then run it. Exit VB IDE when project returns to design mode.
/make
or /m
projectname - compiles an makes exe using the existing settings in proj file
/out
filename
/outdir
path Specifies a directory path to place all output files in when using /make
/d
/cmd
/mdi
or /sdi
... and a couple of others.
Run vb6.exe /?
for more information.