Eeesh, that's a ton of prereqs! Indeed, in your case 20 UAC prompts would be unacceptable. I do wonder how you wound up with a 30 second timeout? (What if installing on a slower computer and the prereq takes more time to load?)
Our product's only chained prereq is .NET Framework 2.0, so we just use the Visual Studio bootstrapper. By sticking to only the NETFX 2.0 features it allows us to jump straight into the MSI on Windows Vista/7. Windows XP users have only the 20-something megabyte download to contend with. All the other dependencies are handled via merge module (VC++2003/2005/2008, and some 3rd-party libs as well). I'd imagine introducing things like SQL Server Express, etc. complicates things a good bit more. You're right that the chaining situation is messy. Just look at Add/Remove Programs these days if anyone says otherwise. James -----Original Message----- From: Christopher Painter [mailto:chr...@deploymentengineering.com] Sent: Wednesday, December 01, 2010 20:09 To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Saving the MSI file My typical bootstrapper installs between 10 and 20 prereqs. I can't imagine each of those packages prompting for elevation. If you don't answer in 30 seconds or so it'll fail and the whole chain is broken. I don't see how I can't elevate up front. I also do matching LaunchConditions in my MSI to make sure the bootstrapper did it's thing. You are right about the caching only I'll take it one step farther. The multiple package per transaction story doesn't fit industry needs. It assumes that all of your packages are MSI and that's simply not the case for me. Heck, many/most things I download from MSFT ( .NET, C++, SQL so on ) are EXE's not MSI's. So sure, I'd love to just click on an MSI, do my feature selection then elevate and chain all my MSI's together but it's just not an option for me. Chris Christopher Painter, Author of Deployment Engineering Blog Have a hot tip, know a secret or read a really good thread that deserves attention? E-Mail Me ----- Original Message ---- From: James Johnston <johnst...@inn-soft.com> To: General discussion for Windows Installer XML toolset. <wix-users@lists.sourceforge.net> Sent: Wed, December 1, 2010 1:36:12 PM Subject: Re: [WiX-users] Saving the MSI file I thought about this but decided against it for some of the security reasons you outline; I did not think it appropriate for the UAC prompt to appear immediately upon running the bootstrapper. The UAC prompt really should not be presented until the user clicks the "Install" button in the UI to actually start the installation. This would be after they configured all the features, etc. They should not have a UAC prompt when invoking the boot-strapper. I know a lot of apps out there don't bother and just require the boot-strapper to elevate; I suspect a lot of them don't even have appropriate manifest resources. It comes across as a little sloppy to me. Also, you are hosed if someone invokes the MSI directly without using the bootstrapper. In my book, the MSI needs to work properly if invoked directly. If other prereqs installed by the bootstrapper are needed, then I check for them via launch conditions to prevent installing if a needed prereq isn't found. The real problem is that MSI was designed for installing off of a CD (Office 2000) back when copying resources like this were unthinkable due to limited hard drive space. I wish Microsoft would address this shortcoming; you'd think they could add a pre-defined property or table (i.e. declarative, simple, easy-to-understand-and-use method) that controls caching the MSI file. Instead everybody does it their own way and now we have this big mess. The solution I used was to create a component for the MSI like this: <Component Id="MYAPPMSI" Guid="<guid>" Location="local"> <CopyFile Id="MYAPPMSICopy" Delete="no" DestinationDirectory="SetupCache" DestinationName="$(var.MSIName)" SourceName="$(var.MSIName)" SourceProperty="SourceDir" /> <File Id="MYAPPMSIKey" KeyPath="yes" Name="key$(var.MSIName)" Source="SupportFiles\ZeroLength.txt" /> <RemoveFile Id="MYAPPMSIRemove" Name="$(var.MSIName)" On="uninstall" /> </Component> Basically, use a zero-length file as the key and use CopyFile/RemoveFile elements to cache the actual MSI. SetupCache is a subdirectory underneath the application. Make additional similar components for other files needing to be cached; in my case there were external CAB files to cache as well. (If your MSI is of significant size then this is best; see http://blogs.msdn.com/b/heaths/archive/2009/02/02/changes-to-package-caching -in-windows-installer-5-0.aspx). For MSI to actually use this SetupCache directory, add a custom action. I used a deferred action placed after PublishProduct. This action calls MsiSourceListAddSource to add the setup cache as a source. Condition for the action is that "$MYAPPMSI = 3" to avoid running on uninstall. This has seemed to work reasonably well, although there must be a case somehow where the MSI files themselves are left behind. I haven't figured out why yet, but usually the RemoveFile deletes them as expected. Hasn't been high priority to isolate the reason why and fix it. James -----Original Message----- From: Christopher Painter [mailto:chr...@deploymentengineering.com] Sent: Tuesday, November 30, 2010 22:37 To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Saving the MSI file Well, that could happen no matter where you put it. InstallShield puts it in [LocalAppDataFolder]\Downloaded Installations by default but I'm not sure I agree with that. They do this ( as I recall ) so that a setup.exe manifested as Invoker could cache the file for a standard user. Problem (IMO) is that if this then elevates and gets installed for all-users it becomes a managed installation and that user who cached it could then tamper with the MSI and do a repair to inject untrusted code into the installer. Remote, but possible. The used to cache it in [WindowsFolder]Downloaded Installations but that required Admin privs. I think personally I've used [CommonAppDataFolder]Downloaded Installations before. When I need a setup.exe I typically manifest it as requireAdmin so that each of my prereqs don't require elevation. I've read that this isn't the best practice but I really don't like the alternatives. I've also written some code that's used during major upgrades to delete the previous versions of the MSI that way they don't pile up into something huge. I usually just leave the final MSI behind on uninstall as the size is typically quite small. I'd look at WiX 3.6 and see what approaches Rob is taking with Burn. Christopher Painter, Author of Deployment Engineering Blog Have a hot tip, know a secret or read a really good thread that deserves attention? E-Mail Me ----- Original Message ---- From: Quinton Tormanen <quint...@deltamotion.com> To: General discussion for Windows Installer XML toolset. <wix-users@lists.sourceforge.net> Sent: Tue, November 30, 2010 4:10:52 PM Subject: Re: [WiX-users] Saving the MSI file Where do you cache it to? Everywhere else I thought of won't get cleaned up and/or might get erased prematurely (e.g. TMP folder). --Quinton -----Original Message----- From: Christopher Painter [mailto:chr...@deploymentengineering.com] Sent: Tuesday, November 30, 2010 2:03 PM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Saving the MSI file I usually just let my bootstrapper handle the caching for me before invoking the MSI. Christopher Painter, Author of Deployment Engineering Blog Have a hot tip, know a secret or read a really good thread that deserves attention? E-Mail Me ----- Original Message ---- From: Quinton Tormanen <quint...@deltamotion.com> To: General discussion for Windows Installer XML toolset. <wix-users@lists.sourceforge.net> Sent: Tue, November 30, 2010 3:46:28 PM Subject: [WiX-users] Saving the MSI file This issue must have discussed dozens of times, but I couldn't find anything. Quite simply, I want to ensure that our full MSI file is available for repairs later (there's a issue currently out of our control that makes this necessary related to the DifxApp toolkit). Our MSI is only 12MB and the benefit of having it available seems to outweigh this teensy amount of storage space. Here is an approach that I was going to look into but, wanted to hear if I'm all wet before I go too far with it: 1. Copy the MSI being used for the install from the source given by the DATABASE public property to a file in my install file. This assumes I can copy the file while it is open. 2. Ensure that the DATABASE public property is updated to hold the location I copied it to, so that it can get put into the ARP for use by later installs. 3. Ensure that this MSI copy is deleted on an uninstall. 4. See if I can include the MSI size in the file size cost estimate. Does this approach seem at all viable? Is there a better way to do it? What do I need to watch out for? Should I try to get the local copy in the LocalPackage or InstallSource entries in the ARP? --Quinton ---------------------------------------------------------------------------- -- Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ---------------------------------------------------------------------------- -- Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ---------------------------------------------------------------------------- -- Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ---------------------------------------------------------------------------- -- Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ---------------------------------------------------------------------------- -- Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ---------------------------------------------------------------------------- -- Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users