Solved

Build VB Executables from a command prompt

Posted on 2000-04-28
2
433 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

895 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

15 Experts available now in Live!

Get 1:1 Help Now