[MS]Building a Bootstrapper via command line
Alright, so you want to use the Generic Bootstrapper to deploy your application but for one reason or another you aren't using ClickOnce or a SetupProject. (You are developing a VC++ app with a custom installer, for example). Well, unfortunately there is no designer support ouf of the box but you still can create a Bootstrapper for your application. How?
The same way Visual Studio does, MSBuild of course!
There is no magic to creating a Bootstrapper, it is just an MSBuild target which ClickOnce and SetupProjects call for you. However, you don't have to leave all the Bootstrappin' fun to Visual Studio. Below is an example MSBuild file for creating a Generic Bootstrapper:
<Project xmlns="https://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<!-- Include the 'Product Code' for every package you want -->
<BootstrapperFile Include="Microsoft.Net.Framework.2.0">
</BootstrapperFile>
</ItemGroup>
<Target Name="Bootstrapper">
<GenerateBootstrapper
ApplicationName="My Awesome Application"
ApplicationFile="MyApp.exe"
BootstrapperItems="@(BootstrapperFile)"
Culture="en"
CopyComponents="True"
OutputPath="D:\CustomBootstrapper\" />
</Target>
</Project>
That's it! Now save that XML to a file, "CLI Bootstrapper Test.xml" for example, and on the command type:
MSBuild "CLI Bootstrapper Test.xml"
MSBuild will parse your target file, do a little magic, and *POOF* your very own private Bootstrapper.
[This is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified in the Terms of Use.]
Comments
- Anonymous
June 29, 2005
Link Listing - June 29, 2005 - Anonymous
July 06, 2005
The comment has been removed - Anonymous
August 08, 2005
How to create a Bootstrapper to launch an EXE file - Anonymous
October 14, 2005
How can I tell the Generatebootstrapper task where to look for packages, e.g. to add an own package? - Anonymous
January 23, 2009
is there a way to have the bootstrapper remember the app has been installed? If i run the setup.exe and then run the .application file directly, it seems to not know it was already installed...