Solved

Build VB Executables from a command prompt

Posted on 2000-04-28
2
434 Views
Last Modified: 2008-03-03
I an in charge of doing system builds for our software.  More than 95% of all of this is in C (written with Visual C++ 5.0), but an increasing percentage is now Visual Basic.

I am able to execute a Perl script that builds all of the C executables by using the command line interface to the compiler (cl.exe).  But so far I have found no way to build VB executables in this manner.  I have been opening each project and manually forcing a recompile.

Is there any command line interface to the VB compiler that will let me use my script to automate VB builds?
0
Comment
Question by:dberkowitz
2 Comments
 
LVL 32

Accepted Solution

by:
Erick37 earned 100 total points
ID: 2761094
0
 
LVL 14

Expert Comment

by:wsh2
ID: 2761099
From MSDN:
--------------------------------------
Command Line Arguments:

Determines whether Visual Basic complies and runs a program, compiles and makes an executable (.exe) file or ActiveX DLL (.dll), or sets the argument part of the command line returned by the Command function.

Syntax

vb6[.exe] [[{/run | /r} projectname] [[{/d compileconst}] {/make | /m } projectname] [{/makedll | /l} projectname] {/cmd argument | /c argument}][{/runexit} projectname][{/m} or {/runexit} projectname /out filename}][{/m}][/sdi] or [/mdi]

The parts of the command line switch syntax are:

Argument Description

projectname:
The name of your project (.vbp) file.

/run or /r:
Tells Visual Basic to compile and run projectname 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. Replace projectname with projectgroupname.

/make or /m:
Tells Visual Basic to compile projectname and make an executable (.exe) file, using the existing settings of the Path, EXEName, and Title properties of the APP object. You can compile and make an executable (.exe) file from more than one project using this command. Replace of the projectname with projectgroupname.

/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.

/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.

/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 toSDI (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 inMDI (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.

---------------------------------------
When used, these arguments must be in a command line to run Visual Basic. For example, you might use them in the Run dialog box from the Run command of the Windows 95 Start Menu. Here is a valid command line that runs Visual Basic, loads a specific project, and runs it:

C:\vb6.exe /r MyProj.vbp
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Windows 10 start screen issues 9 54
Access 2013 combo box not working 3 43
MS Date Picker 64 bit 32 bit issue 12 53
Macro Excel - Multiple If conditions 2 71
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now