Wiki Link: [discussion:4119]
Problems with custom boostrapper 

Nov 11 2010 at 7:29 PM
I'm using the Bootstrapper Manifest Generator to create an prerequisite installer for Seagull Scientific BarTender. I've almost got it functional. The problem I'm having is when setup.exe tries to install BarTender, it's not using the correct path specified by the HomeSite variable. For some reason it's prefixing the path with the Product Name, which causes it to error out.

Downloading files to "C:\DOCUME~1\USERNAME\LOCALS~1\Temp\VSDB1.tmp\"

(11/9/2010 3:40:36 PM) Downloading 'BarTender 9.3\bartender.msi
' from '\\SERVER\bartender\9.3 SR2\Extracted\' to 'C:\DOCUME~1\USERNAME\LOCALS~1\Temp\VSDB1.tmp\'

Download completed at 11/9/2010 3:40:36 PM

Downloading failed with HRESULT=-2146697195



My *.VSBootstrapperManifest file:

<VSBootstrapperManifest>

<ProjectProperties ProjectName="BarTender 9.3" BuildLocation="PackagesDir" BuildDirectory="C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\BarTender9_3" DefaultLanguage="en" />

<UIPackage ProductCode="SeagullScientific.BarTender.9.3">

<UIChecks>

<RegistryCheck RegKey="HKEYLOCALMACHINE\SOFTWARE\Seagull\BarTender 9.3\General" RegValue="Installer Language" Property="BarTenderInstalled" />

</UIChecks>

<Relationships>

<Relationship Type="DependsOn" Code="Microsoft.Windows.Installer.3.1" />

</Relationships>

<CustomSchedules />

</UIPackage>

<UIInstallFile FileName="\\SERVER\BarTender\9.3 SR2\Extracted\BarTender.msi" DisplayName="BarTender 9.3 SR2" Arguments="/qn ProductLanguage=1033 ADDLOCAL=BarTender PKC=xxx" Reboot="Defer" HomeSiteURL="\\SERVER\bartender\9.3 SR2\Extracted" PublicKey="<<File is not Digitally Signed>>" FileHash="E59DF15A18D7163F7EB4284BD7AE96AC2679CF99" IncludeHash="True" Locale="en">

<UIChecks />

<UIInstallConditions>

<UIInstallCondition Type="ByPassIf" Property="BarTenderInstalled" Operator="=" Value="1" Message="" />

<UIInstallCondition Type="FailIf" Property="AdminUser" Operator="=" Value="false" Message="Administrator permissions are required to install the BarTender. Contact your administrator." />

<UIInstallCondition Type="FailIf" Property="VersionNT" Operator="Ver <" Value="5.1.2" Message="Installation of BarTender requires Windows XP SP2, Windows 2003 SP1, Windows Vista, or later. Contact your application vendor" />

</UIInstallConditions>

<UIExitCodes>

<UIExitCode ExitCode="0" Result="Success" Message="" />

<UIExitCode ExitCode="1602" Result="Fail" Message="The user has cancelled the installation. BarTender has not been installed." />

<UIExitCode ExitCode="3010" Result="Success, Reboot Needed" Message="" />

<DefaultExitCode Result="Fail" FormatMessageFromSystem="True" Message="An unexpected exit code was returned from the installer. The installation failed." />

</UIExitCodes>

<LooseFiles />

</UIInstallFile>

</VSBootstrapperManifest>


Which generates the following:

Windows\v7.0A\Bootstrapper\Packages\BarTender 9.3\product.xml

<?xml version="1.0" encoding="utf-8"?>

<Product ProductCode="SeagullScientific.BarTender.9.3" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">

<RelatedProducts>

<DependsOnProduct Code="Microsoft.Windows.Installer.3.1" />

</RelatedProducts>

<InstallChecks>

<RegistryCheck Property="BarTenderInstalled" Key="HKEYLOCALMACHINE\SOFTWARE\Seagull\BarTender 9.3\General" Value="Installer Language" />

</InstallChecks>

</Product>



Windows\v7.0A\Bootstrapper\Packages\BarTender 9.3\en\package.xml

<?xml version="1.0" encoding="utf-8"?>

<Package Name="DisplayName" Culture="Culture" xmlns="http://schemas.microsoft.com/developer/2004/01/bootstrapper">

<PackageFiles CopyAllPackageFiles="false">

<PackageFile Name="bartender.msi" HomeSite="\\SERVER\bartender\9.3 SR2\Extracted\" Hash="E59DF15A18D7163F7EB4284BD7AE96AC2679CF99" />

</PackageFiles>

<Commands Reboot="Defer">

<Command PackageFile="bartender.msi" Arguments="/qn ProductLanguage=1033 ADDLOCAL=BarTender PKC=xxx">

<InstallConditions>

<BypassIf Property="BarTenderInstalled" Compare="ValueEqualTo" Value="1" />

<FailIf Property="AdminUser" Compare="ValueEqualTo" Value="false" String="Administratorpermissions" />

<FailIf Property="VersionNT" Compare="VersionLessThan" Value="5.1.2" String="InstallationofBarTenderr" />

</InstallConditions>

<ExitCodes>

<ExitCode Value="0" Result="Success" />

<ExitCode Value="1602" Result="Fail" String="Theuserhascancelledthein" />

<ExitCode Value="3010" Result="SuccessReboot" />

<DefaultExitCode Result="Fail" String="Anunexpectedexitcodewasr" FormatMessageFromSystem="true" />

</ExitCodes>

</Command>

</Commands>

<Strings>

<String Name="Culture">en</String>

<String Name="DisplayName">BarTender 9.3 SR2</String>

<String Name="Administratorpermissions">Administrator permissions are required to install the BarTender. Contact your administrator.</String>

<String Name="InstallationofBarTenderr">Installation of BarTender requires Windows XP SP2, Windows 2003 SP1, Windows Vista, or later. Contact your application vendor</String>

<String Name="Theuserhascancelledthein">The user has cancelled the installation. BarTender has not been installed.</String>

<String Name="Anunexpectedexitcodewasr">An unexpected exit code was returned from the installer. The installation failed.</String>

</Strings>

</Package>


Anyways I changed from using the extracted MSI file which it could not properly handle to the compressed InstallShield file. Now it properly downloads and installs. Go figure.

Installer log:



Installation of components 'BarTender 9.3 SR2' was accepted.
Copying files to temporary directory "C:\DOCUME~1\USERNAME\LOCALS~1\Temp\VSD1D1.tmp\"
Downloading files to "C:\DOCUME~1\USERNAME\LOCALS~1\Temp\VSD1D1.tmp\"
(11/9/2010 4:46:55 PM) Downloading 'BarTender 9.3\bt932725enu.exe' from '\\SERVER\BarTender\9.3 SR2\BT932725Enu.exe' to 'C:\DOCUME~1\USERNAME\LOCALS~1\Temp\VSD1D1.tmp\'
Download completed at 11/9/2010 4:47:08 PM
Verifying file integrity of C:\DOCUME~1\USERNAME\LOCALS~1\Temp\VSD1D1.tmp\BarTender 9.3\bt932725enu.exe
Verifying file hash
Running checks for package 'BarTender 9.3 SR2', phase BeforePackage
Reading value 'Installer Language' of registry key 'HKEYLOCALMACHINE\SOFTWARE\Seagull\BarTender 9.3\General'
Unable to read registry value
Not setting value for property 'BarTenderInstalled'
The following properties have been set for package 'BarTender 9.3 SR2':
Running checks for command 'BarTender 9.3\bt932725enu.exe'
Skipping ByPassIf because Property 'BarTenderInstalled' was not defined
Result of running operator 'ValueEqualTo' on property 'AdminUser' and value 'false': false
Result of running operator 'VersionLessThan' on property 'VersionNT' and value '5.1.2': false
Result of checks for command 'BarTender 9.3\bt932725enu.exe' is 'Install'
'BarTender 9.3 SR2' RunCheck result: Install Needed
Verifying file integrity of C:\DOCUME~1\USERNAME\LOCALS~1\Temp\VSD1D1.tmp\BarTender 9.3\bt932725enu.exe
Verifying file hash
Installing using command 'C:\DOCUME~1\USERNAME\LOCALS~1\Temp\VSD1D1.tmp\BarTender 9.3\bt932725enu.exe' and parameters '/v"/qn ProductLanguage=1033 ADDLOCAL=BarTender PKC=xxx"'




Manifest:

<VSBootstrapperManifest>
<ProjectProperties ProjectName="BarTender 9.3" BuildLocation="PackagesDir" BuildDirectory="C:\Program Files\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages" DefaultLanguage="en" />
<UIPackage ProductCode="SeagullScientific.BarTender.9.3">
<UIChecks>
<RegistryCheck RegKey="HKEYLOCALMACHINE\SOFTWARE\Seagull\BarTender 9.3\General" RegValue="Installer Language" Property="BarTenderInstalled" />
</UIChecks>
<Relationships>
<Relationship Type="DependsOn" Code="Microsoft.Windows.Installer.3.1" />
</Relationships>
<CustomSchedules />
</UIPackage>
<UIInstallFile FileName="\\SERVER\BarTender\9.3 SR2\BT932725Enu.exe" DisplayName="BarTender 9.3 SR2" Arguments="/v"/qn ProductLanguage=1033 ADDLOCAL=BarTender PKC=xxx"" Reboot="Defer" HomeSiteURL="\\SERVER\BarTender\9.3 SR2\BT932725Enu.exe" PublicKey="30818902818100D72EB557E75354C081BA484277529BF3D3203230897075B8834B804BA62618415F0EB369A7655B9A6D6632025C87B9CF523F4DB02B9DE8FB8327961696BEB579FF322CF45381CF930903EC4EAA211E6D6ACC9B6C9DDDE211DBEB08521A01861D2AF14DA318F095E3E56D4FF84E0FEFD2D897BD58EC4E0BF84AD3D1328D51253D0203010001" FileHash="E59DF15A18D7163F7EB4284BD7AE96AC2679CF99" IncludeHash="True" Locale="en">
<UIChecks />
<UIInstallConditions>
<UIInstallCondition Type="ByPassIf" Property="BarTenderInstalled" Operator="=" Value="1" Message="" />
<UIInstallCondition Type="FailIf" Property="AdminUser" Operator="=" Value="false" Message="Administrator permissions are required to install the BarTender. Contact your administrator." />
<UIInstallCondition Type="FailIf" Property="VersionNT" Operator="Ver <" Value="5.1.2" Message="Installation of BarTender requires Windows XP SP2, Windows 2003 SP1, Windows Vista, or later. Contact your application vendor" />
</UIInstallConditions>
<UIExitCodes>
<UIExitCode ExitCode="0" Result="Success" Message="" />
<UIExitCode ExitCode="1602" Result="Fail" Message="The user has cancelled the installation. BarTender has not been installed." />
<UIExitCode ExitCode="3010" Result="Success, Reboot Needed" Message="" />
<DefaultExitCode Result="Fail" FormatMessageFromSystem="True" Message="An unexpected exit code was returned from the installer. The installation failed." />
</UIExitCodes>
<LooseFiles />
</UIInstallFile>
</VSBootstrapperManifest>


Updating...
Page view tracker