I'm doing batch compiling and need to specify the output directory.
I'm doing batch compiling and need to specify the output directory.
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 projectnameTells Visual Basic to compileprojectnameand run it, using the arguments stored in the Command Line Arguments field of the Make tab of the Project Properties dialog box.
/runexit projectnameTells Visual Basic to compileprojectnameand run it. Visual Basic will exit when the project returns to design mode.
/make or /m projectnameTells Visual Basic to compileprojectnameand make an executable file from it, using the existing settings stored in the project file.
/out filenameSpecifies 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 pathSpecifies 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 argumentPuts 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.
/mdior/sdiChanges 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
projectnamein 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}]
projectnameThe name of your project (.vbp) file.
/runor/rTells Visual Basic to compile and runprojectnameusing 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. Replaceprojectnamewithprojectgroupname.
/makeor/mTells Visual Basic to compileprojectnameand make an executable (.exe) file, using the existing settings of thePath,EXEName, andTitleproperties of theAPPobject. You can compile and make an executable (.exe) file from more than one project using this command. Replace of theprojectnamewithprojectgroupname.
/cmdor/cPuts 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]
/makedllor/lTells Visual Basic to compile projectname and make an in-process ActiveX server (.dll) file from it.
/dor/DTells Visual Basic which values to use for conditional compilation constants when making an .EXE with the /make switch or an ActiveX DLL with the/makedllswitch.
compileconstThe 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]
/runexitTells 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.
filenameThe name of the file to receive errors when you build an executable using the/mor/runexitoption.
/outAllows you to specify a file to receive errors when you build using the/mor /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.
/sdiChanges 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/mdiargument or by clearing the SDI Development Environment option in the Advanced tab of the Options dialog box.
/mdiOpens 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/sdiargument or by selecting the SDI Development Environment option in the Advanced tab of the Options dialog box. MDI mode is the default.