• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 35
  • Last Modified:

Is there a way to insert a file (dll) into a vb.Net setup project from command line?

Is there a way to insert a file (dll) into a vb setup solution/project from command line?

I have a vb  solution with a setup project in it and I need to update a dll in that setup project from the command line. so when I compile it will reflect the updated dll.
let me know
thanks,
0
josephh610
Asked:
josephh610
  • 5
  • 5
  • 2
2 Solutions
 
Jacques Bourgeois (James Burger)Commented:
If you want to do that, you cannot do it simply from a command line. You need an application that can open the .msi file and recreate it.

And even doing so, you would probably end up with problems, because the reference compiled into your application would probably not match the updated dll.

Your best bet is to recompile the application with the updated dll and recreate the setup project.
0
 
GrahamSkanCommented:
VB6 comes with a Package and Deployment Wizard which creates an installation package comprising a set-up program and the necessary files. The user can specify extra files that the Wizard doesn't add automatically.
0
 
josephh610Author Commented:
But once you create the installation package, how do you then add/update files to it from a command line?
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Jacques Bourgeois (James Burger)Commented:
You don't. You create a new package.

The package comes in the form a .msi file. Just as you cannot modifiy a .exe without recompiling it, you cannot modify a .msi without recreating it.

If you could explain more in detail what you want to "update" in the installation, maybe we could help you.
0
 
josephh610Author Commented:
I have a dll which is part of the setup project. The included dll gets updated from time to time. So i would like an easy way from the command line to recompile the solution/project with the newly added dll.
0
 
Jacques Bourgeois (James Burger)Commented:
First of all, something I did not catch when I first read your question: "a vb6 setup solution/project". The notion of a solution did not exist in VB6. And VB6 did not have a Setup Project, it used as Wizard to prepare setups. Are you sure that you are in VB6 and not VB.NET? Both use different ways of preparing setups and updates.

"The included dll gets updated from time to time" if it's only from time to time, then recompiling and creating a new setup manually takes only a few minutes, while creating a command line compile is a lot of work prone to errors and omissions. And this, no matter if you are in VB6 or VB.NET.

If you are in .NET however, and especially if this is for an application that is deployed in-house, then you might consider a ClickOnce deployment over a Setup deployment. This is the easiest way to do what you want to do, and a new update is prepared with only the click of a button, making it even easier than creating a script that can be called from a command line.
0
 
GrahamSkanCommented:
Yes, you can compile an .exe or a .dll with command line switches. This is from the MSDN under Command Line Arguments:

"Syntax

vb5[.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]"

and

"/makedll or /l Tells Visual Basic to compile projectname and make an in-process ActiveX server (.dll) file from it. "

You could run that in a .bat file or a VBScript snippet and then distribute the dll on its own.
However, how would the source code editing be done? You would still have to open an editor, which might as well be VB6.

Note that, VB6 has a Project Group (.vbg) which does the more or less the same as a Solution in .net.
0
 
josephh610Author Commented:
It turns out I am using:
Microsoft (R) Visual Studio Version 8.0.50727.42.
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.

Does that make a difference?
0
 
Jacques Bourgeois (James Burger)Commented:
Then you are in VB.NET, not in VB6, so disregard anything that has been said about VB6.

As I hinted earlier, in VB.NET, especially for in-house updates, ClickOnce is usually a lot easier to use than a setup program and has everything that you want.

You prepare a ClickOnce deployment throught the Publish tab of the project's Properties window. It's easy to set up for the first deployment. By default, the users will install the application through a web or intranet site, but it can be configured to install from a network drive.

When you have an update to distribute, you simply make sure to increase the Publish version number and click on Publish. That is all. That is all for the users too. They won't even have to go back to the deployment location. By default, the next time they will start their application, they will be told that there is a new version and asked if they want it.
0
 
josephh610Author Commented:
Will ClickOnce work with external customers that only have an ftp site as they have protected environments? It sounds like a great solution however not sure if would work for our purposes. We usually just ftp the setup and let there IT install at will.
0
 
Jacques Bourgeois (James Burger)Commented:
By default no.

I have used it with CDs, http and network drives, but have never encountered ftp in the documentation or the standard mechanisms.

However, if you do a quick search (http://www.bing.com/search?q=clickonce%20fpt&FORM=BBMULB&PC=BBMU&QS=n), you will see that a lot of programmers seem to have find workarounds. I have no ideat however on how well it works.
0
 
josephh610Author Commented:
What about updating the metadata in the solution file with the updated file path information and then building?
I noticed you can open a solution file and see all the files listed.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 5
  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now