|
Hello,
I would like to have a component that does not get removed at uninstall. However, if I uninstall and install again, I would like the file to be replaced with the one in the installer. Here is my code: <Component Id="PrefsFileComponent" Guid="*" Permanent="yes" NeverOverwrite="no"> <File Id="PrefsXML" Name="preferences.xml" Source="$(var.RESOURCES)\preferencesServeDirectories.xml" KeyPath="yes" /> </Component> The problem is when I install and uninstall, then edit this "preferences.xml" file. If I do the install, I would like my XML edits to be removed since the installer should replace the file with the one in the MSI. However, it is not getting replaced. I am using Win 7, Wix 3.5 Thanks. -Jono ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users |
|
You could try specifying a version on the File element. I think that will cause Windows Installer
to always replace the unversioned file on disk with what it thinks is a versioned file. Rob On 17/08/2011 16:30, The Eligible Bachelors wrote: > Hello, > > I would like to have a component that does not get removed at uninstall. However, if I uninstall and install again, I would like the file to be replaced with the one in the installer. Here is my code: > > > <Component Id="PrefsFileComponent" Guid="*" Permanent="yes" NeverOverwrite="no"> > <File Id="PrefsXML" Name="preferences.xml" Source="$(var.RESOURCES)\preferencesServeDirectories.xml" KeyPath="yes" /> > </Component> > > The problem is when I install and uninstall, then edit this "preferences.xml" file. If I do the install, I would like my XML edits to be removed since the installer should replace the file with the one in the MSI. However, it is not getting replaced. > > I am using Win 7, Wix 3.5 > > Thanks. > > -Jono > > ------------------------------------------------------------------------------ > Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > user administration capabilities and model configuration. Take > the hassle out of deploying and managing Subversion and the > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users |
|
I do not know how to "specify a version on the File element" as I do not see a version addtibute in the File element.
However I have noticied the following... I do have a version specified in the Product element. If the version increases, the new file will replace the old one. However, I do not want this to be version specific. If I install the same version installer I would like it to overwrite the installed file. ----- Original Message ----- From: Rob Hamflett <[hidden email]> To: [hidden email] Cc: Sent: Thursday, August 18, 2011 8:17 AM Subject: Re: [WiX-users] Replace component on reinstall You could try specifying a version on the File element. I think that will cause Windows Installer to always replace the unversioned file on disk with what it thinks is a versioned file. Rob On 17/08/2011 16:30, The Eligible Bachelors wrote: > Hello, > > I would like to have a component that does not get removed at uninstall. However, if I uninstall and install again, I would like the file to be replaced with the one in the installer. Here is my code: > > > <Component Id="PrefsFileComponent" Guid="*" Permanent="yes" NeverOverwrite="no"> > <File Id="PrefsXML" Name="preferences.xml" Source="$(var.RESOURCES)\preferencesServeDirectories.xml" KeyPath="yes" /> > </Component> > > The problem is when I install and uninstall, then edit this "preferences.xml" file. If I do the install, I would like my XML edits to be removed since the installer should replace the file with the one in the MSI. However, it is not getting replaced. > > I am using Win 7, Wix 3.5 > > Thanks. > > -Jono > > ------------------------------------------------------------------------------ > Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > user administration capabilities and model configuration. Take > the hassle out of deploying and managing Subversion and the > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 ------------------------------------------------------------------------------ Get a FREE DOWNLOAD! and learn more about uberSVN rich system, user administration capabilities and model configuration. Take the hassle out of deploying and managing Subversion and the tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users |
|
Good afternoon
I'm spending the next couple of days investigating Burn in order to ditch our custom C++ bootstrapper. I like what Burn appears to offer. When I try to use a UX DLL that targets the .NET Framework 4, the EXE that Burn outputs won't even launch. The error log in %TEMP% shows: [4A70:46EC][2011-08-24T15:50:11]: Error 0x80131508: Failed to create the managed bootstrapper application. [4A70:46EC][2011-08-24T15:50:11]: Error 0x80131508: Failed to create UX. [4A70:46EC][2011-08-24T15:50:11]: Error 0x80131508: Failed to load UX. [4A70:46EC][2011-08-24T15:50:11]: Error 0x80131508: Failed while running [4A70:46EC][2011-08-24T15:50:11]: Error 0x80131508: Failed to run per-user mode. When I change the UX DLL target to the .NET Framework 3.5, the EXE will launch. Is the .NET Framework 4 supported? My WiX version is 3.6.2005.0 (produced August 5, 2011). Thanks - Shaun The information in this e-mail is intended solely for the addressee and access by anyone else is unauthorized. Omnivex accepts no liability for the content of this e-mail, or for the consequences of any actions taken on the basis of the information provided. Any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. Omnivex makes no warranties, express or implied and is not responsible for errors or omissions. ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users |
|
In reply to this post by The Eligible Bachelors
I think the fact that the file is edited after it is laid down on the computer means the install considers the file to be "customer data" because its Modify date is later than the Create date. That follows the file versioning rules for unversioned files.
One way around that problem is to specify a versioned "companion file" parent in the component you created for the unversioned file. The unversioned file will be installed based on whether or not the verisioned file is installed. In Wix it looks something like this: (Unversioned file component) <Component Id="unversionedfilename" Guid="957B0968-D272-4A02-A0AE-F14ED5AAF239"> <File Name="UnVersionedFileName" ReadOnly="no" CompanionFile="VersionedFile.dll" Source="../../../../../xml/UnVersionedFile.xml" Id="UnVersionedFile.xml" DiskId="1" /> </Component> Note that the unversioned file has no keypath defined and the CompanionFile attribute takes the File Id of the companion parent (the versioned file). The versioned file's component needs no special modifications. Companion files are explained more here: http://msdn.microsoft.com/en-us/library/aa367997(v=vs.85).aspx How companion files are used by the file versioning rules is explained here: http://msdn.microsoft.com/en-us/library/aa368599(v=vs.85).aspx Note that if a higher version of the versioned file exists on the machine, neither file will be installed. So adding a version number in the file table for the unversioned file is definitely a better way to be sure the file is always overwriten. But the companion file method will work if you're sure that the versioned file will always be installed. Hope this helps...good luck. |
|
In reply to this post by Shaun Hayward
Good evening
I'm trying to get a simple managed UX example working without much success. The resulting EXE keeps loading the prerequisite bootstrapper that wants to install .NET 4. The error is: Loading prerequisite bootstrapper application because managed host could not be loaded, error: 0x80131700. Fusion logging is enabled but I'm not getting anything on this error. All I get is a window telling me that the Microsoft .NET Framework is required with a hyperlink to the license (hyperlink works), "Accept & Install" button, and "Decline" button. Decline cancels the install, Accept does nothing (since .NET 4 is already installed) and gives the following message in the log: The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop. I've tried to borrow extensively from the Setup example for WiX 3.6 as managed UX is not currently documented. I have 4 projects in my solution: - Application to be deployed (uses WPF 4) - Installer MSI (written in WiX) - Installer UX DLL (WPF 3.5 Client Profile, compiled to x86, based on WPF User Control project) - Installer EXE (written in WiX, targets Burn) I've looked for this error message on the WiX list and Google, finding a couple of entries but none seem to be what I need, near as I can tell. Your help would be greatly appreciated. We've got 2 commercial products that will use Burn if we can make it work. Code follows below. - Shaun For my UX DLL, the only code I want to run (to prove it's working) is: public class InstallerUX : BootstrapperApplication { protected override void Run() { MessageBox.Show("Foobar!"); this.Engine.Quit(0); } } I also have a file "InstallerUX.BootstrapperCore.config" with the following: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <sectionGroup name="wix.bootstrapper" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.BootstrapperSectionGroup, BootstrapperCore"> <section name="host" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.HostSection, BootstrapperCore" /> </sectionGroup> </configSections> <startup useLegacyV2RuntimeActivationPolicy="true"> <supportedRuntime version="v3.5" /> <!--<supportedRuntime version="v4.0" />--> <!-- supportedRuntime version="v2.0.50727" / --> </startup> <wix.bootstrapper> <host assemblyName="InstallerUX"> <supportedFramework version="v4\Full" /> <supportedFramework version="v4\Client" /> </host> </wix.bootstrapper> </configuration> My bootstrapper project references WixBalExtension and WixUtilExtension. It contains two files. The following is the code for Bundle.wxs: <?xml version="1.0" encoding="UTF-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> <Bundle Name="Burn Test App" Version="1.0.0.0" Manufacturer="Omnivex" UpgradeCode="{306FA343-3D03-46AB-9BAB-A4E64F0AEBC7}" SplashScreenSourceFile='!(wix.GraphicsPath)\SplashScreen.bmp' > <!--<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">--> <BootstrapperApplicationRef Id='ManagedBootstrapperApplicationHost'> <Payload Name='BootstrapperCore.config' SourceFile='!(wix.UXPath)\InstallerUX.BootstrapperCore.config' Compressed='no' /> <Payload SourceFile='!(wix.UXPath)\InstallerUX.dll' Compressed='yes' /> <Payload SourceFile='!(wix.LicensePath)\License.rtf' Compressed='yes' /> <Payload SourceFile='!(wix.NETFX40Path)\NetfxLicense.rtf' Compressed='yes' /> </BootstrapperApplicationRef> <Chain DisableRollback='yes'> <PackageGroupRef Id='Netfx4Full' /> <MsiPackage Id='BurnTestAppMsi' Compressed='yes' Vital='yes' Name='BurnTestApp.msi' SourceFile='!(wix.MSIPath)\BurnTestApp.msi' /> <!-- Note: The following PackageGroupRef is required to pull in generated authoring from project references. --> <PackageGroupRef Id="Bundle.Generated.Packages"/> </Chain> </Bundle> </Wix> This is the code for Netfx.wxs (lifted and slightly modified from the WiX Setup project): <?xml version="1.0" encoding="utf-8"?> <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> <Fragment> <WixVariable Id="WixMbaPrereqPackageId" Value="Netfx4Full" /> <WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf" /> <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4FullVersion" /> <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4x64FullVersion" Win64="yes" /> <PackageGroup Id="Netfx4Full" > <ExePackage Id="Netfx4Full" Cache="no" Compressed="yes" PerMachine="yes" Permanent="yes" Vital="yes" Name="dotNetFx40_Full_x86_x64.exe" SourceFile="!(wix.NETFX40Path)\dotNetFx40_Full_x86_x64.exe" DownloadUrl="http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe" DetectCondition="Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)" /> </PackageGroup> </Fragment> </Wix> And here is the complete log when choosing "Accept & Install": [1B6C:1908][2011-08-24T19:36:39]: Burn v3.6.2005.0, path: C:\Code\Junk\WiX Burn Test\Bootstrapper\BurnTestApp.exe, cmdline: '-burn.unelevated BurnPipe.{FC6E1C99-FDC3-45A5-AAD6-D1A4DF05CEC3} {BB369DAB-5562-4C10-9F41-E825E5387948} 8312' [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'WixBundleName' to value 'Burn Test App' [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'WixBundleLog' to value 'C:\Users\shayward\AppData\Local\Temp\Burn_Test_App_20110824193639.log' [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'WixBundleOriginalSource' to value 'C:\Code\Junk\WiX Burn Test\Bootstrapper\BurnTestApp.exe' [1B6C:1908][2011-08-24T19:36:39]: Loading prerequisite bootstrapper application because managed host could not be loaded, error: 0x80131700. [1B6C:1908][2011-08-24T19:36:39]: Detect 2 packages [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'Netfx4x64FullVersion' to value '4.0.30319' [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'Netfx4FullVersion' to value '4.0.30319' [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {27534f2f-d280-41db-89e7-3ce239f92868}, scope: PerMachine, version: 1.0.0.0, operation: None [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {4ef0a57c-3163-4c20-b3ac-d52765c48b2a}, scope: PerMachine, version: 1.0.0.0, operation: None [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {51a6376f-c388-4fe9-ac42-4f2b6c7fa97e}, scope: PerMachine, version: 1.0.0.0, operation: None [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {531d9bbf-1dd3-4daa-8875-6942e4c68f96}, scope: PerMachine, version: 1.0.0.0, operation: None [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {5886e912-81ec-43ca-8701-84e4dc91e5df}, scope: PerMachine, version: 1.0.0.0, operation: None [1B6C:1908][2011-08-24T19:36:39]: Condition 'Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)' evaluates to true. [1B6C:1908][2011-08-24T19:36:39]: Detected package: Netfx4Full, state: Present, cached: No [1B6C:1908][2011-08-24T19:36:39]: Detect 1 msi features for package: BurnTestAppMsi [1B6C:1908][2011-08-24T19:36:39]: Detected feature: FEAT_Application, state: Absent [1B6C:1908][2011-08-24T19:36:39]: Detected package: BurnTestAppMsi, state: Absent, cached: Yes [1B6C:1908][2011-08-24T19:36:39]: Detect complete, result: 0x0 [1B6C:1908][2011-08-24T19:42:19]: Plan 2 packages, action: Install [1B6C:1908][2011-08-24T19:42:19]: Planned package: Netfx4Full, state: Present, default requested: Present, ux requested: Present, execute: None, rollback: None, cache: Yes, uncache: Yes, dependency: Register [1B6C:1908][2011-08-24T19:42:19]: Planned package: BurnTestAppMsi, state: Absent, default requested: Present, ux requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: Unregister [1B6C:1908][2011-08-24T19:42:19]: Plan complete, result: 0x0 [1B6C:1908][2011-08-24T19:42:19]: Apply begin [2078:2A28][2011-08-24T19:42:19]: Caching executable from: 'C:\Code\Junk\WiX Burn Test\Bootstrapper\BurnTestApp.exe' to: 'C:\ProgramData\Package Cache\{0e4edf15-3575-44b1-be10-c4748c9ae7d6}\BurnTestApp.exe' [2078:2A28][2011-08-24T19:42:19]: Registering bundle dependency key: {0e4edf15-3575-44b1-be10-c4748c9ae7d6}, version 1.0.0.0 [2078:241C][2011-08-24T19:42:19]: Caching payload from working path 'C:\Users\shayward\AppData\Local\Temp\Netfx4Full' to path 'C:\ProgramData\Package Cache\58DA3D74DB353AAD03588CBB5CEA8234166D8B99\dotNetFx40_Full_x86_x64.exe' [2078:2A28][2011-08-24T19:42:19]: Removing cached package: 58DA3D74DB353AAD03588CBB5CEA8234166D8B99, from path: C:\ProgramData\Package Cache\58DA3D74DB353AAD03588CBB5CEA8234166D8B99\ [1B6C:1908][2011-08-24T19:42:19]: Apply complete, result: 0x0 restart: No [1B6C:1908][2011-08-24T19:42:19]: Shutting down, exit code: 0x0 [1B6C:1908][2011-08-24T19:42:19]: The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop. The information in this e-mail is intended solely for the addressee and access by anyone else is unauthorized. Omnivex accepts no liability for the content of this e-mail, or for the consequences of any actions taken on the basis of the information provided. Any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. Omnivex makes no warranties, express or implied and is not responsible for errors or omissions. ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users |
|
In reply to this post by The Eligible Bachelors
The attribute is called DefaultVersion, although if the component is shared with other installers
you might be better off going with Mike's suggestion about companion files. Rob On 24/08/2011 20:01, The Eligible Bachelors wrote: > I do not know how to "specify a version on the File element" as I do not see a version addtibute in the File element. > > However I have noticied the following... I do have a version specified in the Product element. If the version increases, the new file will replace the old one. > > However, I do not want this to be version specific. If I install the same version installer I would like it to overwrite the installed file. > > > > > ----- Original Message ----- > From: Rob Hamflett<[hidden email]> > To: [hidden email] > Cc: > Sent: Thursday, August 18, 2011 8:17 AM > Subject: Re: [WiX-users] Replace component on reinstall > > You could try specifying a version on the File element. I think that will cause Windows Installer > to always replace the unversioned file on disk with what it thinks is a versioned file. > > Rob > > On 17/08/2011 16:30, The Eligible Bachelors wrote: >> Hello, >> >> I would like to have a component that does not get removed at uninstall. However, if I uninstall and install again, I would like the file to be replaced with the one in the installer. Here is my code: >> >> >> <Component Id="PrefsFileComponent" Guid="*" Permanent="yes" NeverOverwrite="no"> >> <File Id="PrefsXML" Name="preferences.xml" Source="$(var.RESOURCES)\preferencesServeDirectories.xml" KeyPath="yes" /> >> </Component> >> >> The problem is when I install and uninstall, then edit this "preferences.xml" file. If I do the install, I would like my XML edits to be removed since the installer should replace the file with the one in the MSI. However, it is not getting replaced. >> >> I am using Win 7, Wix 3.5 >> >> Thanks. >> >> -Jono >> >> ------------------------------------------------------------------------------ >> Get a FREE DOWNLOAD! and learn more about uberSVN rich system, >> user administration capabilities and model configuration. Take >> the hassle out of deploying and managing Subversion and the >> tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 > > > ------------------------------------------------------------------------------ > Get a FREE DOWNLOAD! and learn more about uberSVN rich system, > user administration capabilities and model configuration. Take > the hassle out of deploying and managing Subversion and the > tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2 > _______________________________________________ > WiX-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/wix-users > > > ------------------------------------------------------------------------------ > EMC VNX: the world's simplest storage, starting under $10K > The only unified storage solution that offers unified management > Up to 160% more powerful than alternatives and 25% more efficient. > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users |
|
In reply to this post by Shaun Hayward
maybe 2 aspects:
- what happens when removing the <PackageGroupRef Id='Netfx4Full' /> and preinstall it manually ? - there was yesterday a discussion about similar code here: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-Troubleshoot-Bootstrapper-Application-Startup-td6717206.html. Maybe diffing it against that code + additional comments (Code was not working directly) helps 2011/8/25 Shaun Hayward <[hidden email]>: > Good evening > > I'm trying to get a simple managed UX example working without much success. The resulting EXE keeps loading the prerequisite bootstrapper that wants to install .NET 4. The error is: > > Loading prerequisite bootstrapper application because managed host could not be loaded, error: 0x80131700. > > Fusion logging is enabled but I'm not getting anything on this error. > > All I get is a window telling me that the Microsoft .NET Framework is required with a hyperlink to the license (hyperlink works), "Accept & Install" button, and "Decline" button. Decline cancels the install, Accept does nothing (since .NET 4 is already installed) and gives the following message in the log: > > The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop. > > I've tried to borrow extensively from the Setup example for WiX 3.6 as managed UX is not currently documented. > > I have 4 projects in my solution: > > - Application to be deployed (uses WPF 4) > - Installer MSI (written in WiX) > - Installer UX DLL (WPF 3.5 Client Profile, compiled to x86, based on WPF User Control project) > - Installer EXE (written in WiX, targets Burn) > > I've looked for this error message on the WiX list and Google, finding a couple of entries but none seem to be what I need, near as I can tell. > > Your help would be greatly appreciated. We've got 2 commercial products that will use Burn if we can make it work. > > Code follows below. > > - Shaun > > > For my UX DLL, the only code I want to run (to prove it's working) is: > > public class InstallerUX : BootstrapperApplication > { > protected override void Run() > { > MessageBox.Show("Foobar!"); > this.Engine.Quit(0); > } > } > > I also have a file "InstallerUX.BootstrapperCore.config" with the following: > > <?xml version="1.0" encoding="utf-8" ?> > <configuration> > <configSections> > <sectionGroup name="wix.bootstrapper" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.BootstrapperSectionGroup, BootstrapperCore"> > <section name="host" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.HostSection, BootstrapperCore" /> > </sectionGroup> > </configSections> > <startup useLegacyV2RuntimeActivationPolicy="true"> > <supportedRuntime version="v3.5" /> > <!--<supportedRuntime version="v4.0" />--> > <!-- supportedRuntime version="v2.0.50727" / --> > </startup> > <wix.bootstrapper> > <host assemblyName="InstallerUX"> > <supportedFramework version="v4\Full" /> > <supportedFramework version="v4\Client" /> > </host> > </wix.bootstrapper> > </configuration> > > My bootstrapper project references WixBalExtension and WixUtilExtension. It contains two files. The following is the code for Bundle.wxs: > > <?xml version="1.0" encoding="UTF-8"?> > <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> > > <Bundle > Name="Burn Test App" > Version="1.0.0.0" > Manufacturer="Omnivex" > UpgradeCode="{306FA343-3D03-46AB-9BAB-A4E64F0AEBC7}" > SplashScreenSourceFile='!(wix.GraphicsPath)\SplashScreen.bmp' > > > <!--<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">--> > <BootstrapperApplicationRef Id='ManagedBootstrapperApplicationHost'> > <Payload Name='BootstrapperCore.config' SourceFile='!(wix.UXPath)\InstallerUX.BootstrapperCore.config' Compressed='no' /> > <Payload SourceFile='!(wix.UXPath)\InstallerUX.dll' Compressed='yes' /> > <Payload SourceFile='!(wix.LicensePath)\License.rtf' Compressed='yes' /> > <Payload SourceFile='!(wix.NETFX40Path)\NetfxLicense.rtf' Compressed='yes' /> > </BootstrapperApplicationRef> > > <Chain DisableRollback='yes'> > <PackageGroupRef Id='Netfx4Full' /> > <MsiPackage Id='BurnTestAppMsi' Compressed='yes' Vital='yes' Name='BurnTestApp.msi' SourceFile='!(wix.MSIPath)\BurnTestApp.msi' /> > > <!-- Note: The following PackageGroupRef is required to pull in generated authoring from project references. --> > <PackageGroupRef Id="Bundle.Generated.Packages"/> > </Chain> > </Bundle> > </Wix> > > This is the code for Netfx.wxs (lifted and slightly modified from the WiX Setup project): > > <?xml version="1.0" encoding="utf-8"?> > <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> > <Fragment> > <WixVariable Id="WixMbaPrereqPackageId" Value="Netfx4Full" /> > <WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf" /> > > <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4FullVersion" /> > <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4x64FullVersion" Win64="yes" /> > > <PackageGroup Id="Netfx4Full" > > <ExePackage > Id="Netfx4Full" > Cache="no" > Compressed="yes" > PerMachine="yes" > Permanent="yes" > Vital="yes" > Name="dotNetFx40_Full_x86_x64.exe" > SourceFile="!(wix.NETFX40Path)\dotNetFx40_Full_x86_x64.exe" > DownloadUrl="http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe" > DetectCondition="Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)" /> > > </PackageGroup> > </Fragment> > </Wix> > > And here is the complete log when choosing "Accept & Install": > > [1B6C:1908][2011-08-24T19:36:39]: Burn v3.6.2005.0, path: C:\Code\Junk\WiX Burn Test\Bootstrapper\BurnTestApp.exe, cmdline: '-burn.unelevated BurnPipe.{FC6E1C99-FDC3-45A5-AAD6-D1A4DF05CEC3} {BB369DAB-5562-4C10-9F41-E825E5387948} 8312' > [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'WixBundleName' to value 'Burn Test App' > [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'WixBundleLog' to value 'C:\Users\shayward\AppData\Local\Temp\Burn_Test_App_20110824193639.log' > [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'WixBundleOriginalSource' to value 'C:\Code\Junk\WiX Burn Test\Bootstrapper\BurnTestApp.exe' > [1B6C:1908][2011-08-24T19:36:39]: Loading prerequisite bootstrapper application because managed host could not be loaded, error: 0x80131700. > [1B6C:1908][2011-08-24T19:36:39]: Detect 2 packages > [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'Netfx4x64FullVersion' to value '4.0.30319' > [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'Netfx4FullVersion' to value '4.0.30319' > [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {27534f2f-d280-41db-89e7-3ce239f92868}, scope: PerMachine, version: 1.0.0.0, operation: None > [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {4ef0a57c-3163-4c20-b3ac-d52765c48b2a}, scope: PerMachine, version: 1.0.0.0, operation: None > [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {51a6376f-c388-4fe9-ac42-4f2b6c7fa97e}, scope: PerMachine, version: 1.0.0.0, operation: None > [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {531d9bbf-1dd3-4daa-8875-6942e4c68f96}, scope: PerMachine, version: 1.0.0.0, operation: None > [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {5886e912-81ec-43ca-8701-84e4dc91e5df}, scope: PerMachine, version: 1.0.0.0, operation: None > [1B6C:1908][2011-08-24T19:36:39]: Condition 'Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)' evaluates to true. > [1B6C:1908][2011-08-24T19:36:39]: Detected package: Netfx4Full, state: Present, cached: No > [1B6C:1908][2011-08-24T19:36:39]: Detect 1 msi features for package: BurnTestAppMsi > [1B6C:1908][2011-08-24T19:36:39]: Detected feature: FEAT_Application, state: Absent > [1B6C:1908][2011-08-24T19:36:39]: Detected package: BurnTestAppMsi, state: Absent, cached: Yes > [1B6C:1908][2011-08-24T19:36:39]: Detect complete, result: 0x0 > [1B6C:1908][2011-08-24T19:42:19]: Plan 2 packages, action: Install > [1B6C:1908][2011-08-24T19:42:19]: Planned package: Netfx4Full, state: Present, default requested: Present, ux requested: Present, execute: None, rollback: None, cache: Yes, uncache: Yes, dependency: Register > [1B6C:1908][2011-08-24T19:42:19]: Planned package: BurnTestAppMsi, state: Absent, default requested: Present, ux requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: Unregister > [1B6C:1908][2011-08-24T19:42:19]: Plan complete, result: 0x0 > [1B6C:1908][2011-08-24T19:42:19]: Apply begin > [2078:2A28][2011-08-24T19:42:19]: Caching executable from: 'C:\Code\Junk\WiX Burn Test\Bootstrapper\BurnTestApp.exe' to: 'C:\ProgramData\Package Cache\{0e4edf15-3575-44b1-be10-c4748c9ae7d6}\BurnTestApp.exe' > [2078:2A28][2011-08-24T19:42:19]: Registering bundle dependency key: {0e4edf15-3575-44b1-be10-c4748c9ae7d6}, version 1.0.0.0 > [2078:241C][2011-08-24T19:42:19]: Caching payload from working path 'C:\Users\shayward\AppData\Local\Temp\Netfx4Full' to path 'C:\ProgramData\Package Cache\58DA3D74DB353AAD03588CBB5CEA8234166D8B99\dotNetFx40_Full_x86_x64.exe' > [2078:2A28][2011-08-24T19:42:19]: Removing cached package: 58DA3D74DB353AAD03588CBB5CEA8234166D8B99, from path: C:\ProgramData\Package Cache\58DA3D74DB353AAD03588CBB5CEA8234166D8B99\ > [1B6C:1908][2011-08-24T19:42:19]: Apply complete, result: 0x0 restart: No > [1B6C:1908][2011-08-24T19:42:19]: Shutting down, exit code: 0x0 > [1B6C:1908][2011-08-24T19:42:19]: The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop. > > The information in this e-mail is intended solely for the addressee and access by anyone else is unauthorized. Omnivex accepts no liability for the content of this e-mail, or for the consequences of any actions taken on the basis of the information provided. Any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. Omnivex makes no warranties, express or implied and is not responsible for errors or omissions. > > ------------------------------------------------------------------------------ > EMC VNX: the world's simplest storage, starting under $10K > The only unified storage solution that offers unified management > Up to 160% more powerful than alternatives and 25% more efficient. > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev > _______________________________________________ > WiX-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users |
|
In reply to this post by MikeGa
Thank you for your ideas. I will fiddle with Mike's solution and see if I can get things going as I would like.
The more I read about my scenario, the more I realize it is probably best to not be overwriting a user-edited file, in fact. So perhaps I am going down the wrong road. Cheers. ----- Original Message ----- From: MikeGa <[hidden email]> To: [hidden email] Cc: Sent: Wednesday, August 24, 2011 6:33 PM Subject: Re: [WiX-users] Replace component on reinstall I think the fact that the file is edited after it is laid down on the computer means the install considers the file to be "customer data" because its Modify date is later than the Create date. That follows the file versioning rules for unversioned files. One way around that problem is to specify a versioned "companion file" parent in the component you created for the unversioned file. The unversioned file will be installed based on whether or not the verisioned file is installed. In Wix it looks something like this: (Unversioned file component) <Component Id="unversionedfilename" Guid="957B0968-D272-4A02-A0AE-F14ED5AAF239"> <File Name="UnVersionedFileName" ReadOnly="no" CompanionFile="VersionedFile.dll" Source="../../../../../xml/UnVersionedFile.xml" Id="UnVersionedFile.xml" DiskId="1" /> </Component> Note that the unversioned file has no keypath defined and the CompanionFile attribute takes the File Id of the companion parent (the versioned file). The versioned file's component needs no special modifications. Companion files are explained more here: http://msdn.microsoft.com/en-us/library/aa367997(v=vs.85).aspx How companion files are used by the file versioning rules is explained here: http://msdn.microsoft.com/en-us/library/aa368599(v=vs.85).aspx Note that if a higher version of the versioned file exists on the machine, neither file will be installed. So adding a version number in the file table for the unversioned file is definitely a better way to be sure the file is always overwriten. But the companion file method will work if you're sure that the versioned file will always be installed. Hope this helps...good luck. -- View this message in context: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Replace-component-on-reinstall-tp6695913p6722440.html Sent from the wix-users mailing list archive at Nabble.com. ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users |
|
In reply to this post by Tobias S
Thanks, Tobias.
When removing Netfx4Full, it won't compile. WixBalExtension needs a reference to two variables: WixMbaPrereqPackageId and WixMbaPrereqLicenseUrl. Those variables only have meaning if I have .NET 4 stuff defined. Odd, though, that the pre-req bootstrapper that it defaults to doesn't detect that .Net 4 is already installed. I had a look at the article - thank-you. Someone on there posted some samples of a working *WinForms* example. While not WPF, I'm going to see if I can make that work. I did get past THIS issue by moving back to .NET 3.5 but now it won't load the .NET framework at all and defaults to a prerequisite bootstrapper. I posted a separate message. I'm hoping I can get something - anything - managed to work. WinForms or WPF. Ah, the joys of being on the bleeding edge. :-) Still, if Burn ultimately does for bootstrapping what WiX does for MSIs then I'm a happy man. - Shaun Shaun Hayward | Senior Software Developer | Omnivex | 905.761.6640 ext 429 | www.omnivex.com -----Original Message----- From: Tobias S [mailto:[hidden email]] Sent: Thursday, August 25, 2011 3:47 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] WiX Burn - Loading prerequisite bootstrapper application because managed host could not be loaded - Email found in subject maybe 2 aspects: - what happens when removing the <PackageGroupRef Id='Netfx4Full' /> and preinstall it manually ? - there was yesterday a discussion about similar code here: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-Troubleshoot-Bootstrapper-Application-Startup-td6717206.html. Maybe diffing it against that code + additional comments (Code was not working directly) helps 2011/8/25 Shaun Hayward <[hidden email]>: > Good evening > > I'm trying to get a simple managed UX example working without much success. The resulting EXE keeps loading the prerequisite bootstrapper that wants to install .NET 4. The error is: > > Loading prerequisite bootstrapper application because managed host could not be loaded, error: 0x80131700. > > Fusion logging is enabled but I'm not getting anything on this error. > > All I get is a window telling me that the Microsoft .NET Framework is required with a hyperlink to the license (hyperlink works), "Accept & Install" button, and "Decline" button. Decline cancels the install, Accept does nothing (since .NET 4 is already installed) and gives the following message in the log: > > The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop. > > I've tried to borrow extensively from the Setup example for WiX 3.6 as managed UX is not currently documented. > > I have 4 projects in my solution: > > - Application to be deployed (uses WPF 4) > - Installer MSI (written in WiX) > - Installer UX DLL (WPF 3.5 Client Profile, compiled to x86, based on WPF User Control project) > - Installer EXE (written in WiX, targets Burn) > > I've looked for this error message on the WiX list and Google, finding a couple of entries but none seem to be what I need, near as I can tell. > > Your help would be greatly appreciated. We've got 2 commercial products that will use Burn if we can make it work. > > Code follows below. > > - Shaun > > > For my UX DLL, the only code I want to run (to prove it's working) is: > > public class InstallerUX : BootstrapperApplication > { > protected override void Run() > { > MessageBox.Show("Foobar!"); > this.Engine.Quit(0); > } > } > > I also have a file "InstallerUX.BootstrapperCore.config" with the following: > > <?xml version="1.0" encoding="utf-8" ?> > <configuration> > <configSections> > <sectionGroup name="wix.bootstrapper" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.BootstrapperSectionGroup, BootstrapperCore"> > <section name="host" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.HostSection, BootstrapperCore" /> > </sectionGroup> > </configSections> > <startup useLegacyV2RuntimeActivationPolicy="true"> > <supportedRuntime version="v3.5" /> > <!--<supportedRuntime version="v4.0" />--> > <!-- supportedRuntime version="v2.0.50727" / --> > </startup> > <wix.bootstrapper> > <host assemblyName="InstallerUX"> > <supportedFramework version="v4\Full" /> > <supportedFramework version="v4\Client" /> > </host> > </wix.bootstrapper> > </configuration> > > My bootstrapper project references WixBalExtension and WixUtilExtension. It contains two files. The following is the code for Bundle.wxs: > > <?xml version="1.0" encoding="UTF-8"?> > <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> > > <Bundle > Name="Burn Test App" > Version="1.0.0.0" > Manufacturer="Omnivex" > UpgradeCode="{306FA343-3D03-46AB-9BAB-A4E64F0AEBC7}" > SplashScreenSourceFile='!(wix.GraphicsPath)\SplashScreen.bmp' > > > <!--<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">--> > <BootstrapperApplicationRef Id='ManagedBootstrapperApplicationHost'> > <Payload Name='BootstrapperCore.config' SourceFile='!(wix.UXPath)\InstallerUX.BootstrapperCore.config' Compressed='no' /> > <Payload SourceFile='!(wix.UXPath)\InstallerUX.dll' Compressed='yes' /> > <Payload SourceFile='!(wix.LicensePath)\License.rtf' Compressed='yes' /> > <Payload SourceFile='!(wix.NETFX40Path)\NetfxLicense.rtf' Compressed='yes' /> > </BootstrapperApplicationRef> > > <Chain DisableRollback='yes'> > <PackageGroupRef Id='Netfx4Full' /> > <MsiPackage Id='BurnTestAppMsi' Compressed='yes' Vital='yes' Name='BurnTestApp.msi' SourceFile='!(wix.MSIPath)\BurnTestApp.msi' /> > > <!-- Note: The following PackageGroupRef is required to pull in generated authoring from project references. --> > <PackageGroupRef Id="Bundle.Generated.Packages"/> > </Chain> > </Bundle> > </Wix> > > This is the code for Netfx.wxs (lifted and slightly modified from the WiX Setup project): > > <?xml version="1.0" encoding="utf-8"?> > <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> > <Fragment> > <WixVariable Id="WixMbaPrereqPackageId" Value="Netfx4Full" /> > <WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf" /> > > <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4FullVersion" /> > <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4x64FullVersion" Win64="yes" /> > > <PackageGroup Id="Netfx4Full" > > <ExePackage > Id="Netfx4Full" > Cache="no" > Compressed="yes" > PerMachine="yes" > Permanent="yes" > Vital="yes" > Name="dotNetFx40_Full_x86_x64.exe" > SourceFile="!(wix.NETFX40Path)\dotNetFx40_Full_x86_x64.exe" > DownloadUrl="http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe" > DetectCondition="Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)" /> > > </PackageGroup> > </Fragment> > </Wix> > > And here is the complete log when choosing "Accept & Install": > > [1B6C:1908][2011-08-24T19:36:39]: Burn v3.6.2005.0, path: C:\Code\Junk\WiX Burn Test\Bootstrapper\BurnTestApp.exe, cmdline: '-burn.unelevated BurnPipe.{FC6E1C99-FDC3-45A5-AAD6-D1A4DF05CEC3} {BB369DAB-5562-4C10-9F41-E825E5387948} 8312' > [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'WixBundleName' to value 'Burn Test App' > [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'WixBundleLog' to value 'C:\Users\shayward\AppData\Local\Temp\Burn_Test_App_20110824193639.log' > [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'WixBundleOriginalSource' to value 'C:\Code\Junk\WiX Burn Test\Bootstrapper\BurnTestApp.exe' > [1B6C:1908][2011-08-24T19:36:39]: Loading prerequisite bootstrapper application because managed host could not be loaded, error: 0x80131700. > [1B6C:1908][2011-08-24T19:36:39]: Detect 2 packages > [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'Netfx4x64FullVersion' to value '4.0.30319' > [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'Netfx4FullVersion' to value '4.0.30319' > [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {27534f2f-d280-41db-89e7-3ce239f92868}, scope: PerMachine, version: 1.0.0.0, operation: None > [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {4ef0a57c-3163-4c20-b3ac-d52765c48b2a}, scope: PerMachine, version: 1.0.0.0, operation: None > [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {51a6376f-c388-4fe9-ac42-4f2b6c7fa97e}, scope: PerMachine, version: 1.0.0.0, operation: None > [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {531d9bbf-1dd3-4daa-8875-6942e4c68f96}, scope: PerMachine, version: 1.0.0.0, operation: None > [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {5886e912-81ec-43ca-8701-84e4dc91e5df}, scope: PerMachine, version: 1.0.0.0, operation: None > [1B6C:1908][2011-08-24T19:36:39]: Condition 'Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)' evaluates to true. > [1B6C:1908][2011-08-24T19:36:39]: Detected package: Netfx4Full, state: Present, cached: No > [1B6C:1908][2011-08-24T19:36:39]: Detect 1 msi features for package: BurnTestAppMsi > [1B6C:1908][2011-08-24T19:36:39]: Detected feature: FEAT_Application, state: Absent > [1B6C:1908][2011-08-24T19:36:39]: Detected package: BurnTestAppMsi, state: Absent, cached: Yes > [1B6C:1908][2011-08-24T19:36:39]: Detect complete, result: 0x0 > [1B6C:1908][2011-08-24T19:42:19]: Plan 2 packages, action: Install > [1B6C:1908][2011-08-24T19:42:19]: Planned package: Netfx4Full, state: Present, default requested: Present, ux requested: Present, execute: None, rollback: None, cache: Yes, uncache: Yes, dependency: Register > [1B6C:1908][2011-08-24T19:42:19]: Planned package: BurnTestAppMsi, state: Absent, default requested: Present, ux requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: Unregister > [1B6C:1908][2011-08-24T19:42:19]: Plan complete, result: 0x0 > [1B6C:1908][2011-08-24T19:42:19]: Apply begin > [2078:2A28][2011-08-24T19:42:19]: Caching executable from: 'C:\Code\Junk\WiX Burn Test\Bootstrapper\BurnTestApp.exe' to: 'C:\ProgramData\Package Cache\{0e4edf15-3575-44b1-be10-c4748c9ae7d6}\BurnTestApp.exe' > [2078:2A28][2011-08-24T19:42:19]: Registering bundle dependency key: {0e4edf15-3575-44b1-be10-c4748c9ae7d6}, version 1.0.0.0 > [2078:241C][2011-08-24T19:42:19]: Caching payload from working path 'C:\Users\shayward\AppData\Local\Temp\Netfx4Full' to path 'C:\ProgramData\Package Cache\58DA3D74DB353AAD03588CBB5CEA8234166D8B99\dotNetFx40_Full_x86_x64.exe' > [2078:2A28][2011-08-24T19:42:19]: Removing cached package: 58DA3D74DB353AAD03588CBB5CEA8234166D8B99, from path: C:\ProgramData\Package Cache\58DA3D74DB353AAD03588CBB5CEA8234166D8B99\ > [1B6C:1908][2011-08-24T19:42:19]: Apply complete, result: 0x0 restart: No > [1B6C:1908][2011-08-24T19:42:19]: Shutting down, exit code: 0x0 > [1B6C:1908][2011-08-24T19:42:19]: The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop. > > The information in this e-mail is intended solely for the addressee and access by anyone else is unauthorized. Omnivex accepts no liability for the content of this e-mail, or for the consequences of any actions taken on the basis of the information provided. Any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. Omnivex makes no warranties, express or implied and is not responsible for errors or omissions. > > ------------------------------------------------------------------------------ > EMC VNX: the world's simplest storage, starting under $10K > The only unified storage solution that offers unified management > Up to 160% more powerful than alternatives and 25% more efficient. > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev > _______________________________________________ > WiX-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users |
|
I managed to get a managed WinForms (not WPF) bootstrapper working - and it's .NET 4. One thing I was missing was the [assembly: BootstrapperApplication(typeof(MyBootstrapperAppClassNameHere))] attribute in AssemblyInfo.cs.
I also had to define the WixMbaPrereqPackageId and WixMbaPrereqLicenseUrl variables that were needed but remove the references to 'Netfx4Full' as Tobias suggested. Now I'm getting the form to show up, which is good. So it seems that something odd is happening with the .NET 4 prereq check. Strange, since I lifted it verbatim from the WiX 3.6 setup project. Many thanks - I'm off to a start of some variety. Will probably have more questions as I go. Burn, baby, burn! - Shaun -----Original Message----- From: Shaun Hayward [mailto:[hidden email]] Sent: Thursday, August 25, 2011 1:09 PM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] WiX Burn - Loading prerequisite bootstrapper application because managed host could not be loaded - Email found in subject - Email found in subject Thanks, Tobias. When removing Netfx4Full, it won't compile. WixBalExtension needs a reference to two variables: WixMbaPrereqPackageId and WixMbaPrereqLicenseUrl. Those variables only have meaning if I have .NET 4 stuff defined. Odd, though, that the pre-req bootstrapper that it defaults to doesn't detect that .Net 4 is already installed. I had a look at the article - thank-you. Someone on there posted some samples of a working *WinForms* example. While not WPF, I'm going to see if I can make that work. I did get past THIS issue by moving back to .NET 3.5 but now it won't load the .NET framework at all and defaults to a prerequisite bootstrapper. I posted a separate message. I'm hoping I can get something - anything - managed to work. WinForms or WPF. Ah, the joys of being on the bleeding edge. :-) Still, if Burn ultimately does for bootstrapping what WiX does for MSIs then I'm a happy man. - Shaun Shaun Hayward | Senior Software Developer | Omnivex | 905.761.6640 ext 429 | www.omnivex.com -----Original Message----- From: Tobias S [mailto:[hidden email]] Sent: Thursday, August 25, 2011 3:47 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] WiX Burn - Loading prerequisite bootstrapper application because managed host could not be loaded - Email found in subject maybe 2 aspects: - what happens when removing the <PackageGroupRef Id='Netfx4Full' /> and preinstall it manually ? - there was yesterday a discussion about similar code here: http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-Troubleshoot-Bootstrapper-Application-Startup-td6717206.html. Maybe diffing it against that code + additional comments (Code was not working directly) helps 2011/8/25 Shaun Hayward <[hidden email]>: > Good evening > > I'm trying to get a simple managed UX example working without much success. The resulting EXE keeps loading the prerequisite bootstrapper that wants to install .NET 4. The error is: > > Loading prerequisite bootstrapper application because managed host could not be loaded, error: 0x80131700. > > Fusion logging is enabled but I'm not getting anything on this error. > > All I get is a window telling me that the Microsoft .NET Framework is required with a hyperlink to the license (hyperlink works), "Accept & Install" button, and "Decline" button. Decline cancels the install, Accept does nothing (since .NET 4 is already installed) and gives the following message in the log: > > The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop. > > I've tried to borrow extensively from the Setup example for WiX 3.6 as managed UX is not currently documented. > > I have 4 projects in my solution: > > - Application to be deployed (uses WPF 4) > - Installer MSI (written in WiX) > - Installer UX DLL (WPF 3.5 Client Profile, compiled to x86, based on WPF User Control project) > - Installer EXE (written in WiX, targets Burn) > > I've looked for this error message on the WiX list and Google, finding a couple of entries but none seem to be what I need, near as I can tell. > > Your help would be greatly appreciated. We've got 2 commercial products that will use Burn if we can make it work. > > Code follows below. > > - Shaun > > > For my UX DLL, the only code I want to run (to prove it's working) is: > > public class InstallerUX : BootstrapperApplication > { > protected override void Run() > { > MessageBox.Show("Foobar!"); > this.Engine.Quit(0); > } > } > > I also have a file "InstallerUX.BootstrapperCore.config" with the following: > > <?xml version="1.0" encoding="utf-8" ?> > <configuration> > <configSections> > <sectionGroup name="wix.bootstrapper" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.BootstrapperSectionGroup, BootstrapperCore"> > <section name="host" type="Microsoft.Tools.WindowsInstallerXml.Bootstrapper.HostSection, BootstrapperCore" /> > </sectionGroup> > </configSections> > <startup useLegacyV2RuntimeActivationPolicy="true"> > <supportedRuntime version="v3.5" /> > <!--<supportedRuntime version="v4.0" />--> > <!-- supportedRuntime version="v2.0.50727" / --> > </startup> > <wix.bootstrapper> > <host assemblyName="InstallerUX"> > <supportedFramework version="v4\Full" /> > <supportedFramework version="v4\Client" /> > </host> > </wix.bootstrapper> > </configuration> > > My bootstrapper project references WixBalExtension and WixUtilExtension. It contains two files. The following is the code for Bundle.wxs: > > <?xml version="1.0" encoding="UTF-8"?> > <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"> > > <Bundle > Name="Burn Test App" > Version="1.0.0.0" > Manufacturer="Omnivex" > UpgradeCode="{306FA343-3D03-46AB-9BAB-A4E64F0AEBC7}" > SplashScreenSourceFile='!(wix.GraphicsPath)\SplashScreen.bmp' > > > <!--<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense">--> > <BootstrapperApplicationRef Id='ManagedBootstrapperApplicationHost'> > <Payload Name='BootstrapperCore.config' SourceFile='!(wix.UXPath)\InstallerUX.BootstrapperCore.config' Compressed='no' /> > <Payload SourceFile='!(wix.UXPath)\InstallerUX.dll' Compressed='yes' /> > <Payload SourceFile='!(wix.LicensePath)\License.rtf' Compressed='yes' /> > <Payload SourceFile='!(wix.NETFX40Path)\NetfxLicense.rtf' Compressed='yes' /> > </BootstrapperApplicationRef> > > <Chain DisableRollback='yes'> > <PackageGroupRef Id='Netfx4Full' /> > <MsiPackage Id='BurnTestAppMsi' Compressed='yes' Vital='yes' Name='BurnTestApp.msi' SourceFile='!(wix.MSIPath)\BurnTestApp.msi' /> > > <!-- Note: The following PackageGroupRef is required to pull in generated authoring from project references. --> > <PackageGroupRef Id="Bundle.Generated.Packages"/> > </Chain> > </Bundle> > </Wix> > > This is the code for Netfx.wxs (lifted and slightly modified from the WiX Setup project): > > <?xml version="1.0" encoding="utf-8"?> > <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi" xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"> > <Fragment> > <WixVariable Id="WixMbaPrereqPackageId" Value="Netfx4Full" /> > <WixVariable Id="WixMbaPrereqLicenseUrl" Value="NetfxLicense.rtf" /> > > <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4FullVersion" /> > <util:RegistrySearch Root="HKLM" Key="SOFTWARE\Microsoft\Net Framework Setup\NDP\v4\Full" Value="Version" Variable="Netfx4x64FullVersion" Win64="yes" /> > > <PackageGroup Id="Netfx4Full" > > <ExePackage > Id="Netfx4Full" > Cache="no" > Compressed="yes" > PerMachine="yes" > Permanent="yes" > Vital="yes" > Name="dotNetFx40_Full_x86_x64.exe" > SourceFile="!(wix.NETFX40Path)\dotNetFx40_Full_x86_x64.exe" > DownloadUrl="http://download.microsoft.com/download/9/5/A/95A9616B-7A37-4AF6-BC36-D6EA96C8DAAE/dotNetFx40_Full_x86_x64.exe" > DetectCondition="Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)" /> > > </PackageGroup> > </Fragment> > </Wix> > > And here is the complete log when choosing "Accept & Install": > > [1B6C:1908][2011-08-24T19:36:39]: Burn v3.6.2005.0, path: C:\Code\Junk\WiX Burn Test\Bootstrapper\BurnTestApp.exe, cmdline: '-burn.unelevated BurnPipe.{FC6E1C99-FDC3-45A5-AAD6-D1A4DF05CEC3} {BB369DAB-5562-4C10-9F41-E825E5387948} 8312' > [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'WixBundleName' to value 'Burn Test App' > [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'WixBundleLog' to value 'C:\Users\shayward\AppData\Local\Temp\Burn_Test_App_20110824193639.log' > [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'WixBundleOriginalSource' to value 'C:\Code\Junk\WiX Burn Test\Bootstrapper\BurnTestApp.exe' > [1B6C:1908][2011-08-24T19:36:39]: Loading prerequisite bootstrapper application because managed host could not be loaded, error: 0x80131700. > [1B6C:1908][2011-08-24T19:36:39]: Detect 2 packages > [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'Netfx4x64FullVersion' to value '4.0.30319' > [1B6C:1908][2011-08-24T19:36:39]: Setting string variable 'Netfx4FullVersion' to value '4.0.30319' > [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {27534f2f-d280-41db-89e7-3ce239f92868}, scope: PerMachine, version: 1.0.0.0, operation: None > [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {4ef0a57c-3163-4c20-b3ac-d52765c48b2a}, scope: PerMachine, version: 1.0.0.0, operation: None > [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {51a6376f-c388-4fe9-ac42-4f2b6c7fa97e}, scope: PerMachine, version: 1.0.0.0, operation: None > [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {531d9bbf-1dd3-4daa-8875-6942e4c68f96}, scope: PerMachine, version: 1.0.0.0, operation: None > [1B6C:1908][2011-08-24T19:36:39]: Detected related bundle: {5886e912-81ec-43ca-8701-84e4dc91e5df}, scope: PerMachine, version: 1.0.0.0, operation: None > [1B6C:1908][2011-08-24T19:36:39]: Condition 'Netfx4FullVersion AND (NOT VersionNT64 OR Netfx4x64FullVersion)' evaluates to true. > [1B6C:1908][2011-08-24T19:36:39]: Detected package: Netfx4Full, state: Present, cached: No > [1B6C:1908][2011-08-24T19:36:39]: Detect 1 msi features for package: BurnTestAppMsi > [1B6C:1908][2011-08-24T19:36:39]: Detected feature: FEAT_Application, state: Absent > [1B6C:1908][2011-08-24T19:36:39]: Detected package: BurnTestAppMsi, state: Absent, cached: Yes > [1B6C:1908][2011-08-24T19:36:39]: Detect complete, result: 0x0 > [1B6C:1908][2011-08-24T19:42:19]: Plan 2 packages, action: Install > [1B6C:1908][2011-08-24T19:42:19]: Planned package: Netfx4Full, state: Present, default requested: Present, ux requested: Present, execute: None, rollback: None, cache: Yes, uncache: Yes, dependency: Register > [1B6C:1908][2011-08-24T19:42:19]: Planned package: BurnTestAppMsi, state: Absent, default requested: Present, ux requested: None, execute: None, rollback: None, cache: No, uncache: No, dependency: Unregister > [1B6C:1908][2011-08-24T19:42:19]: Plan complete, result: 0x0 > [1B6C:1908][2011-08-24T19:42:19]: Apply begin > [2078:2A28][2011-08-24T19:42:19]: Caching executable from: 'C:\Code\Junk\WiX Burn Test\Bootstrapper\BurnTestApp.exe' to: 'C:\ProgramData\Package Cache\{0e4edf15-3575-44b1-be10-c4748c9ae7d6}\BurnTestApp.exe' > [2078:2A28][2011-08-24T19:42:19]: Registering bundle dependency key: {0e4edf15-3575-44b1-be10-c4748c9ae7d6}, version 1.0.0.0 > [2078:241C][2011-08-24T19:42:19]: Caching payload from working path 'C:\Users\shayward\AppData\Local\Temp\Netfx4Full' to path 'C:\ProgramData\Package Cache\58DA3D74DB353AAD03588CBB5CEA8234166D8B99\dotNetFx40_Full_x86_x64.exe' > [2078:2A28][2011-08-24T19:42:19]: Removing cached package: 58DA3D74DB353AAD03588CBB5CEA8234166D8B99, from path: C:\ProgramData\Package Cache\58DA3D74DB353AAD03588CBB5CEA8234166D8B99\ > [1B6C:1908][2011-08-24T19:42:19]: Apply complete, result: 0x0 restart: No > [1B6C:1908][2011-08-24T19:42:19]: Shutting down, exit code: 0x0 > [1B6C:1908][2011-08-24T19:42:19]: The prerequisites were already installed. The bootstrapper application will not be reloaded to prevent an infinite loop. > > The information in this e-mail is intended solely for the addressee and access by anyone else is unauthorized. Omnivex accepts no liability for the content of this e-mail, or for the consequences of any actions taken on the basis of the information provided. Any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of the company. Omnivex makes no warranties, express or implied and is not responsible for errors or omissions. > > ------------------------------------------------------------------------------ > EMC VNX: the world's simplest storage, starting under $10K > The only unified storage solution that offers unified management > Up to 160% more powerful than alternatives and 25% more efficient. > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev > _______________________________________________ > WiX-users mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/wix-users > ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ EMC VNX: the world's simplest storage, starting under $10K The only unified storage solution that offers unified management Up to 160% more powerful than alternatives and 25% more efficient. Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev _______________________________________________ WiX-users mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/wix-users |
| Powered by Nabble | Edit this page |
