{"id":307,"date":"2011-03-03T22:20:14","date_gmt":"2011-03-03T12:20:14","guid":{"rendered":"http:\/\/jcrawfor74.wordpress.com\/?p=307"},"modified":"2012-01-15T10:35:46","modified_gmt":"2012-01-14T23:35:46","slug":"bootstrap-manifest-generator-2008-how-to-guide-v2","status":"publish","type":"post","link":"https:\/\/ntsblog.homedev.com.au\/index.php\/2011\/03\/03\/bootstrap-manifest-generator-2008-how-to-guide-v2\/","title":{"rendered":"Bootstrapper Manifest Generator (2008) &#8211; How To Guide v2"},"content":{"rendered":"<div id=\"ntsbl-2203974311\" class=\"ntsbl-before-content ntsbl-entity-placement\"><script async src=\"\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-6288941070289539\" crossorigin=\"anonymous\"><\/script><ins class=\"adsbygoogle\" style=\"display:inline-block;width:728px;height:90px;\" \ndata-ad-client=\"ca-pub-6288941070289539\" \ndata-ad-slot=\"9356781486\"><\/ins> \n<script> \n(adsbygoogle = window.adsbygoogle || []).push({}); \n<\/script>\n<\/div><p>\nI wrote the original Boostrapper Manifest Generator (BMG) blog post a few years ago.\n<\/p>\n<p>It is one of the most heavily visited pages on my site so I thought I should revisit it, and given that the BMG is so buggy it could be useful to have some screen shots.<\/p>\n<p>\nI will provide 2 concrete examples of how to use the BMG to create a bootstrapper pre-requisite check.\n<\/p>\n<p>\nAll this is being done on a Windows 7 32-bit (Virtual) machine, with visual studio 2010 installed.<\/p>\n<p>\nI have also downloaded and installed the BMG2008 which can be downloaded from <a href=\"http:\/\/archive.msdn.microsoft.com\/bmg\">here<\/a>\n<\/p>\n<p>\nThe application that I am going to bootstrapper is a small test application called &#8220;GuidGenerator&#8221;, can you guess what it does?<\/p>\n<p>\nI will be using a standard setup deployment project to create the installer.\n<\/p>\n<p>\nHere goes..\n<\/p>\n<h2>Setup BMG 2008<\/h2>\n<ol>\n<li>Download the BMG2008 from <a href=\"http:\/\/archive.msdn.microsoft.com\/bmg\">here<\/a><\/li>\n<li>Install the application and note the path that it is installed to as it does not create a short cut, (C:Program FilesMicrosoftBootstrapper Manifest Generator for VS2008), and create your own desktop shortcut<\/li>\n<li>Run the BMG<\/li>\n<li>Click &#8220;Tools :: Edit Machine Paths&#8221;<\/li>\n<li>You may get a message about the SDK not being installed etc etc. Get past the error message and you will need to set the path to your boot strap directory. Do a search on your file system for &#8220;bootstrapper&#8221; and you will find a folder somewhere like this (note the SDK path)<br \/>\n    C:Program FilesMicrosoft SDKsWindowsv7.0ABootstrapper <br \/>\n    Enter that into the path and choose OK.<\/p>\n<p>\n    You are now ready to create a bootstrapper\n    <\/p>\n<p>    Note: This bootstrapper folder is important &#8211; read the tips and tricks at the end.\n     <\/li>\n<\/ol>\n<h2>Example 1 &#8211; .Net Framework 4.0 Pre-requisite Check<\/h2>\n<ol>\n<li>Download the DotNet framework full install from Microsoft <a href=\"http:\/\/www.microsoft.com\/downloads\/en\/details.aspx?displaylang=en&amp;FamilyID=0a391abd-25c1-4fc0-919f-b21f31ab88b7\">here<\/a>, and save to a location that you can find, mine is @ c:DownloadsdotNetFx40_Full_x86_x64.exe <\/li>\n<li>Run the BMG <\/li>\n<li>Click &#8220;File New&#8221;<\/li>\n<li>Choose &#8220;Package Manifest&#8221;, choose OK<\/li>\n<li>Choose &#8220;Add Install File&#8221;, (button in the top left)\n<p>\n            <img decoding=\"async\" src=\"http:\/\/public.bay.livefilestore.com\/y1pGIv7exKYEskthEDKSJ3qGJ8P7jJ_4Da9h7ZKNh7HFK_96dkdfo9Bwyc8FxMGEp6RS1XOCXm327t-QsGGT8OTsQ\/Menu.PNG?psid=1\" \/>\n        <\/p>\n<\/li>\n<li>Browse to the .Net Framework that you downloaded earlier and click OK<\/li>\n<li><b>Display Name:<\/b> enter a name for the bootstrapper, this is the name of the pre-requisite check that will show up in visual studio. I will call mine &#8220;My .net Framework 4.0 Check&#8221;\n        <\/li>\n<li>Click back on the &#8220;Package&#8221; option which is the root of the tree menu on the left and set the Product Name to DotNet4Check &#8211; this becomes the name of the folder that the package is created in.<br \/>\n        <b>Note: You have to do it in this order as if you set the package name before adding a file it crashes the BMG.<\/b><\/li>\n<li>Click into the product code field and it will default with the &#8220;Product Name&#8221; just set, (otherwise this can throw a warning if left blank).<\/li>\n<li><b>System Checks<\/b>\n<ul>\n                You want to set up a system check that fails if the condition is not met, or alternatively by-pass the install if a condition is met.<br \/>\n                If it fails the check then it will prompt the user that they need to install the pre-requisite.<\/p>\n<p>                For the .Net Framework I have chosen to do a simple registry check for the .Net Framework version.<\/p>\n<li>Switch to the system checks tab<\/li>\n<li>Click on the registry check (2nd icon in the list)<\/li>\n<li><b>Property for Result:<\/b> DotNet4RegCheck (note: this is the name of the check that is used later in the &#8220;Install Conditions&#8221; tab<\/li>\n<li>Enter the following registry key: HKLMSoftwareMicrosoftNET Framework SetupNDPv4Full<\/li>\n<li>Registry Value: Version<\/li>\n<li>\n                    <img decoding=\"async\" src=\"http:\/\/public.bay.livefilestore.com\/y1p7DsmS9gpLvAi2jRoCEj5cuS5u-qy2-eFq2jk4GMVe-iGrctb3K1BU9cRxXONIq17B8C2yPPQbtWqpbRISdy3Mw\/RegistryCheck.PNG?psid=1\" \/>\n                <\/li>\n<\/ul>\n<\/li>\n<li><b>Install Conditions<\/b>\n<ul>\n<li>Switch to the install conditions tab. This is where we define when our installer should be run.<\/li>\n<li><b>Type: <\/b>ByPassIf<\/li>\n<li><b>Property: <\/b>DotNet4RegCheck &#8211; (This is the name entered in the &#8220;Property for Result&#8221; field in the system check<\/li>\n<li><b>Comparison: <\/b>Ver &gt;=<\/li>\n<li><b>Value:<\/b> 4.0.30319<\/li>\n<li>\n                    <img decoding=\"async\" src=\"http:\/\/public.bay.livefilestore.com\/y1pMnGALdgGJ0kwSim5obNsg-a8jSza9WGaUx6HPC87gHJXS-PK30POOOthsru2tMmSdgYyFUhIMvo585aysJWViA\/InstallCondition_registry.PNG?psid=1\" \/>\n                <\/li>\n<\/ul>\n<\/li>\n<li><b>Exit Codes<\/b><br \/>\n         Set the following: (Note: I am cheating as I am reverse engineering the .Net bootstrapper that comes with VS2010 to get these exit codes<\/p>\n<ul>\n                0 &#8211; Success<br \/>\n                3010 &#8211; Success with reboot\n            <\/ul>\n<p>            Leave all the other options with their defaults<\/p>\n<p>\n                <img decoding=\"async\" src=\"http:\/\/public.bay.livefilestore.com\/y1pFr7DrvxefIZOyQlrmSEaP4smQXaXZpmJmYrYtOiLnEv0oP2LiarlxTMDbElzmdlJzVNZ5zyECaPu6Wr96l-5UA\/ExitCodes.PNG?psid=1\" \/>\n            <\/p>\n<\/li>\n<li><b>Build:<\/b> Now we can build the package, (button top right)<\/li>\n<li>Results, note that in my case it succeeded with no errors, and the path contains the folder name that I entered in the product name field.\n<p>\n            <img decoding=\"async\" src=\"http:\/\/public.bay.livefilestore.com\/y1pcvoqRsF6pcgdd_s8FKobsP7lM-ikOkCwFt-nipPJlu3Wn_jT9OFJhbhjbonXSNPCQVZ5yk1oDO8JeoqJV_JJYw\/BuildResults.PNG?psid=1\" \/>\n        <\/p>\n<\/li>\n<li><b>Copy:<\/b> Go to the output directory and copy the &#8220;DotNet4Check&#8221; folder to &#8220;C:Program FilesMicrosoft SDKsWindowsv7.0ABootstrapperPackages&#8221;<\/li>\n<li><b>Setup Project<\/b>\n<ol>\n<li>My project looks like this:\n<p>\n                    <img decoding=\"async\" src=\"http:\/\/public.bay.livefilestore.com\/y1pMyIGAIyHVfRlinXsqxp4CjVmQOX-vAEkX6MsniDX-S1XuSFtp6od4l27U4nOZ96Ck0bVlVk_HR6SWL_tv0geOQ\/GuidSolution.PNG?psid=1\" \/>\n                <\/p>\n<\/li>\n<li>Right Click on the Setup Project and choose properites<\/li>\n<li>On the properties window Click the &#8220;Pre-Requisites&#8221; button.<\/li>\n<li>Deselect anything that is selected that you do not require and choose your check.\n<p>\n                    <img decoding=\"async\" src=\"http:\/\/public.bay.livefilestore.com\/y1pYNwNcaKQqEi2524N3Bg3LLsn7djnGdxKLonCUSB21gT9ygVI46ZodSXPtLI3fmwYoWz9IYKlLz0W1ZAhZEARdg\/PreRequisites.png?psid=1\" \/>\n                <\/p>\n<\/li>\n<li>In this case I am going to say &#8211; &#8220;Download prerequisites from the same location as my application&#8221;<\/li>\n<li>Build the setup solution in release mode.<\/li>\n<li>Copy the release directory somewhere to a machine missing the pre-requisites. The release directory should look something like this, because we chose to set the download from the same location.\n<p>\n                    <img decoding=\"async\" src=\"http:\/\/public.bay.livefilestore.com\/y1pMyIGAIyHVfRWfOHsJEI5myb-PE4UoqhIoFZEnXQNZv24U_hmlJvQWEBZ_MQXWmqSZHfH37wqnYfViI5L-y1SXw\/Files.PNG?psid=1\" \/>\n                <\/p>\n<\/li>\n<li>Run the installer and you will see this&#8230;\n<p>\n                    <img decoding=\"async\" src=\"http:\/\/public.bay.livefilestore.com\/y1pMnGALdgGJ0kt4I0mEIXOZYLoBFtdMR03dCsfKMdJ-iH39t5hgkkYwadp61W89F4Ov_66I_ZQlMRsBBpluwRnrg\/InstallCheck.png?psid=1\" \/>\n                <\/p>\n<\/li>\n<\/ol>\n<\/li>\n<\/ol>\n<h2>Example 2 &#8211; .Net Framework 4.0 Pre-requisite Check &#8211; web download<\/h2>\n<p>\n    In this example we want to supply a web download version of the installer so you don&#8217;t have to distribute the requisite files with your installer.<\/p>\n<p>    This will be identical to the previous example with these changes:<\/p>\n<ol>\n<li>After adding the file you get the Properties tab. Enter the URL from the tips below in the &#8220;HomeSite URL&#8221; setting.<br \/>\n        I used &#8211; http:\/\/go.microsoft.com\/fwlink\/?linkid=182805 for the .Net 4.0 Framework. (remember you must right-click and choose paste).<\/p>\n<\/li>\n<li>\n            When setting up the package pre-requisites choose to &#8220;Download Pre-requisites from the package vendors website&#8221;.\n        <\/li>\n<\/ol>\n<p>    Repeat all the other steps and when you choose &#8220;install&#8221; from the bootstrapper prompt you should get a message that it is downloading.\n<\/p>\n<h2>Tips and Tricks<\/h2>\n<ul>\n<li>The &#8220;Bootstrapper&#8221; directory is your friend (on my machine &#8220;C:Program FilesMicrosoft SDKsWindowsv7.0ABootstrapper&#8221;).<br \/>\n    If you have access to a VS2010 installed machine and go to the bootstrapper directory and into the Packages folder and you will find bootstrappers for 19 different things, including .Net 3.5\/4.0 and Client installation versions.<br \/>\n    I suspect if you took a copy of the packages folder back to your older VS2005\/2008 environment you would get the pre-requisites.\n    <\/li>\n<li>If you don&#8217;t intend to set up exit conditions don&#8217;t switch to the &#8220;Exit Conditions tab&#8221;. if you do it will put an empty condition in that throws a warning at build time. The only way to get rid of it is to enter 0 \/ Success.<\/li>\n<li>\n        I suspect for things like .Net you want the user to be able to download the .exe directly. Here are the URL&#8217;s provided by the .Net bootstrappers installed with VS2010.<br \/>\n        <br \/>\n        These are the small web installer based versions<\/p>\n<ul>\n<li><b>.Net Framework 3.5 SP1: <\/b> http:\/\/go.microsoft.com\/fwlink\/?linkid=118076 <a href=\"http:\/\/go.microsoft.com\/fwlink\/?linkid=118076\"> download<\/a><\/li>\n<li><b>.Net Framework 3.5 Client: <\/b> http:\/\/go.microsoft.com\/fwlink\/?LinkId=119637 <a href=\"http:\/\/go.microsoft.com\/fwlink\/?LinkId=119637\"> download<\/a><\/li>\n<li><b>.Net Framework 4.0: <\/b> http:\/\/go.microsoft.com\/fwlink\/?linkid=182805 <a href=\"http:\/\/go.microsoft.com\/fwlink\/?linkid=182805\"> download<\/a><\/li>\n<li><b>.Net Framework 4.0 Client: <\/b> http:\/\/go.microsoft.com\/fwlink\/?linkid=182804 <a href=\"http:\/\/go.microsoft.com\/fwlink\/?linkid=182804\"> download<\/a><\/li>\n<\/ul>\n<\/li>\n<li>My web install failed because on my Install I happened to click into the &#8220;Value&#8221; field and it put the following &#8220;N\/A for ValueExists and ValueNotExists&#8221;. This created an &#8220;unexpected error&#8221; on install.<br \/>\n    I went into the product.xml file and set value=&#8221;&#8221; and it worked.\n     <\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I wrote the original Boostrapper Manifest Generator (BMG) blog post a few years ago. It is one of the most heavily visited pages on my [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5,6],"tags":[],"class_list":["post-307","post","type-post","status-publish","format-standard","hentry","category-c","category-code"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts\/307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/comments?post=307"}],"version-history":[{"count":0,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/posts\/307\/revisions"}],"wp:attachment":[{"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/media?parent=307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/categories?post=307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ntsblog.homedev.com.au\/index.php\/wp-json\/wp\/v2\/tags?post=307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}