Visual Studio Setup & Deployment: Adding Pre Requisits
Asked Answered
E

1

5

How can I add into Setup & Deployment project that I want to the client has more components, like:

Microsoft Chart Controls
Microsoft SQL 2008 Express Edition (not 2005)

etc...

alt text http://img55.imageshack.us/img55/2586/200902021225eu9.png

This options are not in VS 2008, and in the window (image above) it only has a link to "Check Microsoft Update for more Redistributable components" but it goes to a page with 2 "bootstrapper packages" (I don't even know what's this)

any ideas on how to add this to the project instead asking the users to install this manually?

Thank you.

Embolic answered 2/2, 2009 at 11:27 Comment(0)
C
4

Have a look at the article

Authoring a Custom Bootstrapper Package for Visual Studio 2005

If you locate a folder C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\BootStrapper\Packages (VS 2005) or, for VS 2008, C:\Program Files\Microsoft SDKs\Windows\v6.0A\Bootstrapper\Packages

Each folder under 'Packages' is the prerequisite you see in the list, as shown on your screenshot.

So, if you want to add an application called MyPrereq as a prerequisite, you need to make your own folder 'MyPrereq' under 'Packages'. Then you make a product.xml file similar to this

<?xml version="1.0" encoding="utf-8"?>
<Product ProductCode="MyPrereq" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
  <PackageFiles CopyAllPackageFiles="false">
    <PackageFile Name="MyPrereq.exe" />
  </PackageFiles>
  <InstallChecks>
  </InstallChecks>
  <Commands Reboot="None">
    <Command PackageFile="MyPrereq.exe" EstimatedInstallSeconds="90">
      <InstallConditions>
      </InstallConditions>
      <ExitCodes>
    <ExitCode Value="0" Result="Success"/>
        <DefaultExitCode Result="Fail" String="GeneralFailure" FormatMessageFromSystem="true" />
      </ExitCodes>
    </Command>
  </Commands>
</Product>

and your package.xml file similar to this

<?xml version="1.0" encoding="utf-8"?>
<Package Name="MyPrereq" Culture="Culture" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
  <Strings>
    <String Name="Culture">en</String>
    <String Name="DisplayName">MyPrereq</String>
    <String Name="GeneralFailure">A fatal error occurred. The installation failed.</String>
  </Strings>
</Package>

and place these files and your setup package (MyPrereq.exe) in the folder. Check the existing packages as an example to see where to place files.

If you do everything properly, you will be able to see your MyPrereq option in the list of "Choose which prerequisites to install".

Calicut answered 23/2, 2009 at 3:30 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.