# Syntax for adding additional args to /make for VB6 compile

**URL:** https://www.finalbuilder.com/forums/t/syntax-for-adding-additional-args-to-make-for-vb6-compile/145
**Category:** Discussion
**Created:** [July 28, 2006, 8:41am UTC](https://www.finalbuilder.com/forums/t/syntax-for-adding-additional-args-to-make-for-vb6-compile/145 "2006-07-28T08:41:59Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [July 28, 2006, 8:41am UTC](https://www.finalbuilder.com/forums/t/syntax-for-adding-additional-args-to-make-for-vb6-compile/145/1 "2006-07-28T08:41:59Z")

</div>

I am trying to run a third party utility to add line-numbering to my code at compile time for my VB6 projects.   
  
Can someone tell me what the syntax is for adding an argument? I keep getting the following error no matter what argument I specify:  
  
Invalid syntax for constant declarations  
One or more of the properties in ‘C:\PHC\onesource\bin\MSP\MOMD\src\FBTemp.vbp’ was bad. Some or all of the properties might not be set correctly.  
  
I have tried the following:  
  
/cmd   
/c

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [July 28, 2006, 8:43am UTC](https://www.finalbuilder.com/forums/t/syntax-for-adding-additional-args-to-make-for-vb6-compile/145/2 "2006-07-28T08:43:55Z")

</div>

Also- is there a way to see what the actual command passed to vb6.exe was?

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [July 31, 2006, 3:18am UTC](https://www.finalbuilder.com/forums/t/syntax-for-adding-additional-args-to-make-for-vb6-compile/145/3 "2006-07-31T03:18:34Z")

</div>

Hi Owen  
  
The syntax is the same as it is in VB, eg:  
  
Conditional=1:AnotherConditional=0:More=1  
  
The command line is vb6.exe /make c:\temp\fbtemp.vbp /d Conditional=1:AnotherConditional=0:More=1  
  
HTH

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [August 4, 2006, 11:34am UTC](https://www.finalbuilder.com/forums/t/syntax-for-adding-additional-args-to-make-for-vb6-compile/145/4 "2006-08-04T11:34:18Z")

</div>

So are you saying the FB doesn't support using the /cmd option when compiling VB6 projects?

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [August 7, 2006, 3:07am UTC](https://www.finalbuilder.com/forums/t/syntax-for-adding-additional-args-to-make-for-vb6-compile/145/5 "2006-08-07T03:07:19Z")

</div>

Posted By Owen Manske on 04 Aug 2006 4:34 PM  

So are you saying the FB doesn't support using the /cmd option when compiling VB6 projects?

  
  
Unfortunately not. I can add it quite easily though. To be honest, when I wrote the VB6 action for finalbuilder 1 (about 6 years ago now) I couldn't figure out what exactly the /cmd option did when compiling the project from the command line. Even now, I'm none the wiser. The msdn site has two pages that document the command line options, and has two different descriptions for the /cmd option :  
  
[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vb98/html/vbconcommandline.asp](http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vb98/html/vbconcommandline.asp)  
  
[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconusingcommandlineoptions.asp](http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon98/html/vbconusingcommandlineoptions.asp)  
  
If you could point me to some information that might help me figure out what it does I will be gladd to add support for it (I need to know what it does so that I can actually test it).

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [August 8, 2006, 5:13am UTC](https://www.finalbuilder.com/forums/t/syntax-for-adding-additional-args-to-make-for-vb6-compile/145/6 "2006-08-08T05:13:46Z")

</div>

Vincent,  
  
The /cmd option, as I understand it, simply allows you to pass command line arguments to VB.exe, or any app built using VB6.  
  
What I am trying to accomplish is to add line numbering to my application at compile time. I was looking for any utility that would add line numbering from the command line and didn’t find any so I was going to write my own. Then I did end up finding one written by Keith Dimmock ([http://www.geocities.com/keith\_dimmock/kdaddin2.html](http://www.geocities.com/keith_dimmock/kdaddin2.html))  
  
I have tested it (version 5.0.6) from the command line and from the IDE and it does work. This is the syntax for the command I used (from the command line):  
  
vb6.exe /make “C:\MyVB6Project.vbp” /d /out “MyVB6Project.dll” /outdir “C:\SomeDirectory” /cmd /kdline /kdout "foo.txt"  
  
foo.txt logs what the line-numbering utility did.  
  
In this case, the command line argument is /kdline which is an argument specifying to run the kdline application.  
  
I’m not positive of the specifics, the only example MSDN gives is calling cmdlineargs (thanks Microsoft).  
  
[http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/html/vafctCommand.asp](http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/html/vafctCommand.asp)  
  
Let me know if this is enough, or if you need more.  
  
Thanks a billion,  
  
Owen

---

<div class="post-metadata">

### Author: ![dpaultn](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/d/e9c0ed/32.png) [@dpaultn](https://www.finalbuilder.com/forums/u/dpaultn)
#### Post date: [October 9, 2006, 3:23am UTC](https://www.finalbuilder.com/forums/t/syntax-for-adding-additional-args-to-make-for-vb6-compile/145/7 "2006-10-09T03:23:31Z")

</div>

Thanks for this data!! Just what I’ve been looking for. Since I’m a new user of FinalBuilder, how would I include this into the script. In the “Compile Visual Basic Project” action or something else?  
  
Thanks,  
Dave

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [October 10, 2006, 1:39am UTC](https://www.finalbuilder.com/forums/t/syntax-for-adding-additional-args-to-make-for-vb6-compile/145/8 "2006-10-10T01:39:15Z")

</div>

I have added support for this in the next update to FB4, there will be a CommandLineArgs property to the Visual Basic action that is only visible in the action inspector. I have no way to test this option though, I have followed what I could from the minimal msdn doco.

---

<div class="post-metadata">

### Author: ![dpaultn](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/d/e9c0ed/32.png) [@dpaultn](https://www.finalbuilder.com/forums/u/dpaultn)
#### Post date: [October 10, 2006, 2:19am UTC](https://www.finalbuilder.com/forums/t/syntax-for-adding-additional-args-to-make-for-vb6-compile/145/9 "2006-10-10T02:19:17Z")

</div>

Great. Thanks!! What is the release date for that update?

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [October 11, 2006, 1:31am UTC](https://www.finalbuilder.com/forums/t/syntax-for-adding-additional-args-to-make-for-vb6-compile/145/10 "2006-10-11T01:31:41Z")

</div>

We should have a test build available later today, I’ll post here when it’s available for download.

---

<div class="post-metadata">

### Author: ![Vincent](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/vincent/32/938_2.png) [@Vincent](https://www.finalbuilder.com/forums/u/Vincent)
#### Post date: [October 11, 2006, 8:47am UTC](https://www.finalbuilder.com/forums/t/syntax-for-adding-additional-args-to-make-for-vb6-compile/145/11 "2006-10-11T08:47:47Z")

</div>

Hi Owen  
  
The the test build with the changes mentioned above is here :  
  
[https://www.finalbuilder.com/downloads/finalbuilder/420/FB420\_300.exe](https://www.finalbuilder.com/downloads/finalbuilder/420/FB420_300.exe)

---

<div class="post-metadata">

### Author: ![deleted\_user](https://www.finalbuilder.com/forums/user_avatar/www.finalbuilder.com/deleted_user/32/937_2.png) [@deleted\_user](https://www.finalbuilder.com/forums/u/deleted_user)
#### Post date: [October 11, 2006, 3:15am UTC](https://www.finalbuilder.com/forums/t/syntax-for-adding-additional-args-to-make-for-vb6-compile/145/12 "2006-10-11T03:15:06Z")

</div>

Awesome- thanks!

I'm not sure when I'll be able to test it out, but when I do- I'll let you know how it goes.

Owen

---

<div class="post-metadata">

### Author: ![dpaultn](https://www.finalbuilder.com/forums/letter_avatar_proxy/v4/letter/d/e9c0ed/32.png) [@dpaultn](https://www.finalbuilder.com/forums/u/dpaultn)
#### Post date: [October 11, 2006, 4:04am UTC](https://www.finalbuilder.com/forums/t/syntax-for-adding-additional-args-to-make-for-vb6-compile/145/13 "2006-10-11T04:04:15Z")

</div>

I have tested the “CommandLine Arguments”, within the “Compile Visual Basic Project” action, with the “KDAddIn” line renumbering and it works perfectly!!  
  
Syntax:  
/cmd /kdline /kdout "LineNumber.txt"  
  
Thank you to all for the data and the build!  
Dave
