Solved

Build VB Executables from a command prompt

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

743 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