0

According to the question Bundling only part of the prerequisites with ClickOnce a ClickOnce installer can either download ALL prerequisites from the web or expects ALL of the files locally. This seems to be the same for a Visual Studio 2008 deployment project.

As I would also prefer to include only selected prerequisites in an installer archive I was wondering if this is really still state of the art. Will upgrading to Visual Studio 2010 solve this issue or is there any workaround that I overlooked?

Community
  • 1
  • 1
Paul B.
  • 2,394
  • 27
  • 47

2 Answers2

0

So here's an idea that I came up with.

  • Package the bootstrap installer with all prerequisites except the .NET framework with "Download prerequisites from the component vendor's web site" set
  • Create a small program (batch file or executable) that is launched instead of the bootstrap installer which does the following
    • Check if .NET framework is installed (the bootstrap package files tell you how to check this, e.g. .NET framework is installed if HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\1033\Install == 1)
    • If yes execute setup.exe -homesite=false which configures the installer not to download any files
    • Execute setup.exe

Comments welcome!

Paul B.
  • 2,394
  • 27
  • 47
0

You can package the prerequisite and set a download URL and put the prerequisite there. Then when the prerequisite is installed by the bootstrapper, it will download it from the URL instead of having to include it in the deployment package. This means, of course, that you have to set up your own bootstrapper package every time you want to do this, but it does work.

RobinDotNet
  • 11,723
  • 3
  • 30
  • 33
  • Thanks for your suggestion. Wouldn't this approach also mean I need to distribute all prerequisites to the user? My goal is that 95%+ of all users are happy with a single file they download which includes the small prerequisites which they probably have not installed yet (e.g. VSTO runtime). Only for the remaining users the bootstrapper would need to download files from the vendor's website (e.g. .NET framework). – Paul B. Aug 27 '12 at 13:04