Bootstrapper, Sync Framework 2.1 - Prerequisites

EDIT: After some more searching, I found a way to complete this. I used this preview page to modify my Product.xml then I copied part of my existing Product.xml to check if it is already installed.

So, I have successfully implemented Sync Framework 2.1 on my system and in my C # application. However, when I publish it and test it on another PC where the Sync Framework is not installed, it gets errors So I try to enable SyncSDK-v2.1-x86-ENU.msi on install.

After searching it turned out that I need to add it to the list of preconditions (Project -> Properties -> Publish -> prequintsites)

I tried this link about Creating Custom Packages . However, it still points to a BMG (Bootstrapper Manifest Generator) that no longer exists.

The next solution was to create it manually, I think I am on the right track, but just cannot complete it. What I've done:

  • Downloaded dotNetFx45_Full_x86_x64.exe and placed it in: C: \ Program Files (x86) \ Microsoft SDK \ Windows \ v8.1A \ Bootstrapper \ Packages \ DotNetFX45
  • Created a new folder called SyncFrame inside C: \ Program Files (x86) \ Microsoft SDK \ Windows \ v8.1A \ Bootstrapper \ Packages \
  • Added Product.xml and copied SyncSDK-v2.1-x86-ENU.msi to SyncFrame folder. Also added the "en" subfolder, where the Package.xml and Eula.rtf files were created.
  • In VS2013 Project-> Properties-> Publish-> Prerequisites I selected, "Download the required components from the same location as my application."
  • When published, it successfully adds the "dotnetfx45" folder to the published folder that contains the .exe file. This is, of course, because I checked "Microsoft .NET Framework 4.5 (x86 and x64) in the prerequisite selection window."

However, I am still unable to get Sync Framework 2.1 in the prerequisite selection box.

Here is my (possibly garbage) Product.xml: EDIT: Now this is Product.xml which fixed my problem:

 <?xml version="1.0" encoding="utf-8" ?>
<Product
xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
 ProductCode="Microsoft.Sample.EULA">
 <!-- Defines the list of files to be copied on build. -->
<PackageFiles CopyAllPackageFiles="false">
<PackageFile Name="SyncSDK-v2.1-x86-ENU.msi"/>
 </PackageFiles>

<InstallChecks>
  <MsiProductCheck Product="IsMsiInstalled"
   Property="{{4A3EAF2F-F950-4BF2-B0C7-857E0E970E5A}}"/>
 </InstallChecks>

<!-- Defines how to run the Setup package.-->
 <Commands >
  <Command PackageFile = "SyncSDK-v2.1-x86-ENU.msi" Arguments=''>
   <InstallConditions>
    <BypassIf Property="IsMsiInstalled"
      Compare="ValueGreaterThan" Value="0"/>
    <FailIf Property="AdminUser"
      Compare="ValueNotEqualTo" Value="True"
     String="NotAnAdmin"/>
  </InstallConditions>
  <ExitCodes>
    <ExitCode Value="0" Result="Success" />
    <ExitCode Value="-1" Result="Fail" String="AU_Unaccepted" />
    <DefaultExitCode Result="Fail" 
      FormatMessageFromSystem="true" String="GeneralFailure" />
  </ExitCodes>
  </Command>
</Commands>

      

I used How to create a product manifest to do this ...

And here is my Package.xml

<?xml version="1.0" encoding="utf-8" ?>
<Package
 xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper"
 Name="DisplayName"
 Culture="Culture"
  LicenseAgreement="Eula.rtf">

  <PackageFiles>
<PackageFile Name="Eula.rtf"/>
 </PackageFiles>

  <Strings>
<String Name="DisplayName">Sync Framework 2.1</String>
<String Name="Culture">en</String>
<String Name="NotAnAdmin">You must be an administrator to install this package.       </String>
  <String Name="GeneralFailure">
  A general error has occurred while
  installing this package.
   </String>
  </Strings>
 </Package>

      

Small question, but not a problem at the moment, I also use SQL databases included locally in the project and online databases. Whether to select additional prerequisites in the prerequisite selection box. how is SQL Server express 2012 localDB? Edit: Yes

This works fine, but I would still like to create the product.xml so that it is automatically downloaded from the website rather than putting it in the installation folder. This makes the installation folder large for a small application.

+3


source to share


2 answers


Finally I ended up with a bootstrappers based loader for sync environment 2.0

here is the package and product xml respectively:

product.xml for SyncFX20Core (x64)

<?xml version="1.0" encoding="UTF-8"?>
<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="SyncFX20Core(x64)"/>

      

package.xml for SyncFX20Core (x64)

<?xml version="1.0" encoding="utf-8"?>
<Package Name="DisplayName" LicenseAgreement="synchronizationeula_english.rtf" Culture="Culture" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
  <PackageFiles CopyAllPackageFiles="false">
    <PackageFile Name="synchronizationeula_english.rtf" />
    <PackageFile Name="Synchronization-v2.1-x64-ENU.msi" HomeSite="SyncFX21_64" PublicKey="3082010A0282010100BD72B489E71C9F85C774B8605C03363D9CFD997A9A294622B0A78753EDEE463AC75B050B57A8B7CA05CCD34C77477085B3E5CBDF67E7A3FD742793679FD78A034430C6F7C9BAC93A1D0856444F17080DF9B41968AA241CFB055785E9C54E072137A7EBCE2C2FB642CD2105A7D6E6D32857C71B7ACE293607CD9E55CCBBF122EBA823A40D29C2FBD0C35A3E633DC72C490B7B7985F088EF71BD435AE3A3B30DF355FB25E0E220D3E79A5E94A5332D287F571B556A0C3244EF666C6FF0389CEF02AD9AA1DD9807100E3C1869E2794E4614E0B98CD0756D9CAC009C2D42F551B85AF4784583E92E7C2BBB5DCD196128AD94430AC56A42FFB532AEA42922DE16E8D30203010001" />
  </PackageFiles>
  <Commands Reboot="Defer">
    <Command PackageFile="Synchronization-v2.1-x64-ENU.msi" Arguments="/quiet" EstimatedInstallSeconds="80" EstimatedTempBytes="20000000">
      <ExitCodes>
        <ExitCode Value="0" Result="Success" />
        <ExitCode Value="112" Result="Fail" String="DiskFull" />
        <DefaultExitCode Result="Fail" String="Anunexpectedexitcodewasr" FormatMessageFromSystem="true" />
      </ExitCodes>
    </Command>
  </Commands>
  <Strings>
    <String Name="Culture">en</String>
    <String Name="DisplayName">SyncFX21Core (x64)</String>
    <String Name="SyncFX21_64">http://download.microsoft.com/download/E/1/E/E1E636E6-AA5C-4052-9927-D722312DB564/Synchronization-v2.1-x64-ENU.msi</String>
    <String Name="DiskFull">DiskFull</String>
    <String Name="Anunexpectedexitcodewasr">An unexpected exit code was returned from the installer. The installation failed.</String>
  </Strings>
</Package>

      



product.xml for SyncFX20DatabaseProviders (x64)

<?xml version="1.0" encoding="utf-8"?>
<Product ProductCode="SyncFX20DatabaseProviders(x64)" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
  <RelatedProducts>
    <DependsOnProduct Code="SyncFX20Core(x64)" />
  </RelatedProducts>
</Product>

      

package for SyncFX20DatabaseProviders (x64)

<?xml version="1.0" encoding="utf-8"?>
<Package Name="DisplayName" LicenseAgreement="databaseproviderseula_english.rtf" Culture="Culture" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">
  <PackageFiles CopyAllPackageFiles="false">
    <PackageFile Name="databaseproviderseula_english.rtf" />
    <PackageFile Name="DatabaseProviders-v3.1-x64-ENU.msi" HomeSite="SyncFX21DatabaseProviders_64" PublicKey="3082010A0282010100BD72B489E71C9F85C774B8605C03363D9CFD997A9A294622B0A78753EDEE463AC75B050B57A8B7CA05CCD34C77477085B3E5CBDF67E7A3FD742793679FD78A034430C6F7C9BAC93A1D0856444F17080DF9B41968AA241CFB055785E9C54E072137A7EBCE2C2FB642CD2105A7D6E6D32857C71B7ACE293607CD9E55CCBBF122EBA823A40D29C2FBD0C35A3E633DC72C490B7B7985F088EF71BD435AE3A3B30DF355FB25E0E220D3E79A5E94A5332D287F571B556A0C3244EF666C6FF0389CEF02AD9AA1DD9807100E3C1869E2794E4614E0B98CD0756D9CAC009C2D42F551B85AF4784583E92E7C2BBB5DCD196128AD94430AC56A42FFB532AEA42922DE16E8D30203010001" />
  </PackageFiles>
  <Commands Reboot="Defer">
    <Command PackageFile="DatabaseProviders-v3.1-x64-ENU.msi" Arguments="/quiet" EstimatedInstallSeconds="80" EstimatedTempBytes="20000000">
      <ExitCodes>
        <ExitCode Value="0" Result="Success" />
        <ExitCode Value="112" Result="Fail" String="DiskFull" />
        <DefaultExitCode Result="Fail" String="Anunexpectedexitcodewasr" FormatMessageFromSystem="true" />
      </ExitCodes>
    </Command>
  </Commands>
  <Strings>
    <String Name="Culture">en</String>
    <String Name="DisplayName">SyncFX21DatabaseProviders (x64)</String>
    <String Name="SyncFX21DatabaseProviders_64">http://download.microsoft.com/download/E/1/E/E1E636E6-AA5C-4052-9927-D722312DB564/DatabaseProviders-v3.1-x64-ENU.msi</String>
    <String Name="DiskFull">DiskFull</String>
    <String Name="Anunexpectedexitcodewasr">An unexpected exit code was returned from the installer. The installation failed.</String>
  </Strings>
</Package>

      

Please feel free to contact me if you need more information or source files ... ameser@gmail.com

Hooray!.

+2


source


Xml for x86 version with validation installed:



<?xml version="1.0" encoding="UTF-8"?>
<Product xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper" ProductCode="SyncFX21Core (x86)" >
    <PackageFiles CopyAllPackageFiles="false">
        <PackageFile Name="synchronization-v2.1-x86-enu.msi" PublicKey="3082010A0282010100BD3089FB4572A8536B9E894F0023C0BED41D3DB1594038F373918226E696120053D91C820E3CCE1DBBBDF7428D97D4FC381AE4B9F9E3ECD36103BFA0D3D6754D5C46A9ED5EF0D2E2695B1A73EAB31C8D04CD2944A064592F1E985D6EC7AB18398265C4A7BCAB758819EA87971426B37F2676A4D4383984E3B326D518F92BE9D2C9165A5421F2978D878629FEF4492CE68BF8043F7DCDCD9692860D7103E2D0FE0C4235FFD7B83FDD8E450A7DF6D74BAD5BF076721D77237D8935C41C5DB250034B476D07A75588980680A681AD544ED881D6FABF42C031BE550D99D553491230EBE5A5887C5EC47A5A148708B43769A0EB32248C08EBF9D414BAE0FCCDEAA4150203010001" />
    </PackageFiles>

    <InstallChecks>
        <RegistryCheck Property="Installed" Key="HKLM\SOFTWARE\Microsoft\Microsoft Sync Framework\v2.1\Setup\SynchronizationX86" Value="Install"/>
    </InstallChecks>

    <Commands>
        <Command PackageFile="synchronization-v2.1-x86-enu.msi" Arguments="/quiet" EstimatedInstallSeconds="80" EstimatedTempBytes="20000000">
            <InstallConditions>
                <BypassIf Property="Installed" Compare="ValueEqualTo" Value="1" />
                <FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="AdminRequired" />
            </InstallConditions>
            <ExitCodes>
                <ExitCode Value="0" Result="Success" />
                <ExitCode Value="112" Result="Fail" String="DiskFull" />
                <DefaultExitCode Result="Fail" String="Anunexpectedexitcodewasr" FormatMessageFromSystem="true" />
            </ExitCodes>
        </Command>
    </Commands>
    <Strings>
        <String Name="DiskFull">DiskFull</String>
        <String Name="AdminRequired">Administrator permissions are required to install Sync Framework 2.1. Contact your administrator.</String>    
        <String Name="Anunexpectedexitcodewasr">An unexpected exit code was returned from the installer. The installation failed.</String>
    </Strings>
</Product>

      

0


source







All Articles