开发者

How can I rename a VB6 executable?

I'm trying to automate a VB6 build where different apps 开发者_Python百科are built from the same source by:

  1. Changing "Conditional Compilation Arguments".
  2. "Make Project" to a different executable name.

I can do part of this on the command line:

VB6.EXE /m Project.VBP /d BUILD_OTHER_APP=1

but the executable still has the name "Project.exe". If I rename the .EXE it stops working (doesn't seem to run). VB6 doesn't seem to have a command line option to set the executable name and I can't get round this problem with renaming.

I'm using VB6 on Win7 32-bit.


If you run VB6 /? from the command line a dialog box pops up to tell you all the options, and no, it seems that there isn't an option to specify the output filename.

I can't as yet see any reason for a rename to stop an executable working, but I'll try this later on today on Win XP.

The other workaround to renaming is to move the executables into folders of different names and create shortcuts or batch files of different names to call the correct executable.

edit: I'm working on Win XP and these two solutions are available to me:

  1. Rename the executable - You might be able to develop on XP and run on Win7?
  2. Add the .exe name to the build command line. This does override the .vbp:
    • VB6 /m Project1 /d conHello=-1 Hello.exe
    • VB6 /m Project1 /d conHello=0 World.exe


The hack that we are forced to do to create a different named output (and to change other aspects of the project) is to create a copy of the VBP (Project_tmp.vbp), and then change the name in the copy and build from that copy.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜