Burn does lots of work to make this scenario work (per-machine prerequisites 
and one or more per-user packages). It's unique among bootstrappers because it 
does it in all the right user contexts and all that. I saw a follow up email 
from you on a fork of this thread that found the most important thing: You need 
to make sure your per-user package is truly per-user.  The easiest way to do 
that is to use: Package/@InstallScope='perUser'.

-----Original Message-----
From: Sascha Sertel [mailto:sascha.ser...@gmail.com] 
Sent: Friday, January 24, 2014 12:18 PM
To: General discussion about the WiX toolset.
Subject: Re: [WiX-users] dual-purpose installer (ALLUSERS=2) and Bootstrapper

Let me clarify a bit to tell you what I'm trying to do, what I've tried, and 
what I thought isn't currently working:

Goal: Build a WiX installer for my software which installs .NET Framework
4.5.1 if needed, C++ Runtime if needed, and my software. My software needs to 
be installed per-user, i.e. it should go into AppData\Local, not Program Files.

My understanding is
- To accomplish my goal I need three components: .NET Framework 4.5.1 package 
(provided by NetFx extension), C++ Runtime merge module, and MSI for my software
- The two prerequisites needs to be installed on a per-machine (elevated) 
level, my software on a per-user level

This is what I've tried:
Attempt 1. Created a WiX bundle with two packages inside the Chain element:
A PackageGroupRef for NetFx451Web, and an MsiPackage that includes my software 
as well as the C++ merge module.
Problem: This wouldn't build because my software Package had InstallScope 
perUser but apparently the C++ merge module forced ALLUSERS="1" which 
conflicted with the perUser setting. This problem went away when I took the 
merge module out of the package.

Attempt 2: Created a WiX bundle with three packages inside the Chain
element: A PackageGroupRef for NetFx451Web, an MsiPackage for my C++ Runtime 
merge module (InstallScope perMachine), and an MsiPackage for my software 
(InstallScope perUser).
Problem: When running the resulting bundle it would prompt for elevation (which 
is fine), then install .NET Framework fine, then install the merge module fine, 
but throw an error for my perUser package: "The installer has insufficient 
privileges to access this directory: C:\Program Files\<product>. The 
installation cannot continue. Log on as administrator or contact your system 
administrator."

My software package uses a folder underneath ProgramFilesFolder as the target 
folder and I was expecting that on Win7 and up in a per-user install it 
automatically translates to LocalAppDataFolder instead.

I thought from what I had gathered in this thread is that once the bundle gets 
elevated permissions it will also try to run my software package in forced per 
machine mode but without elevation, and therefore fails when trying to access 
the Program Files directory.

Your last remark sounds though as if this should work. Please help me 
understand what I'm doing wrong.

// Sascha



On Fri, Jan 24, 2014 at 11:14 AM, Rob Mensching <r...@robmensching.com>wrote:

> If you package is per-user then Burn handles that correctly. It will 
> elevate only if necessary (i.e installing per-machine prerequisites) 
> and install your per-user package.  Burn is *designed* to handle that 
> correctly.
>
> -----Original Message-----
> From: Sascha [mailto:sascha.ser...@gmail.com]
> Sent: Friday, January 24, 2014 10:51 AM
> To: wix-users@lists.sourceforge.net
> Subject: Re: [WiX-users] dual-purpose installer (ALLUSERS=2) and 
> Bootstrapper
>
> I just ran into this exact same issue and have been trying to find a 
> suitable solution. I need to install the .NET Framework and also a 
> newer
> C++ runtime as per-machine prerequisites but my software on a per-user
> basis.
>
> Would using the managed bootstrapper help get around this issue by any 
> chance? My understanding is that using the managed bootstrapper means 
> there are actually two bootstrappers, one that takes care of 
> installing .NET Framework if needed, and then the managed one that gets 
> launched after.
>
> If the "inner" managed bootstrapper is capable of doing a regular 
> per-user install after the "outer" native bootstrapper installs the 
> .NET Framework, that would solve most of this issue. I say most 
> because I also need to install the C++ runtime, but for now I could 
> resort to deploy the C++ DLLs locally with my app instead of using the merge 
> module.
>
> I'm looking at some of the managed bootstrapper tutorials and blob 
> posts right now and will slap something together to try out this 
> theory, but if anybody already knows the answer that would be even 
> better. I'll post another reply with my findings once I'm done.
>
> The only other alternative I see is using some other means like a 
> simple batch file to execute multiple bundles in series, that way I 
> would have one bundle with .NET and C++ runtime in it which would run 
> per-machine or just the MSIs for those without a bundle, and then 
> another bundle with my per-user software MSI. Not ideal especially for 
> issues and error conditions, but better than asking my end-user to run 
> a couple of MSIs manually.
>
> // Sascha
>
>
>
> --
> View this message in context:
> http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/dual-pur
> pose-installer-ALLUSERS-2-and-Bootstrapper-tp7591740p7592050.html
> Sent from the wix-users mailing list archive at Nabble.com.
>
>
> ----------------------------------------------------------------------
> -------- CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical 
> Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.
> clktrk _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
>
>
> ----------------------------------------------------------------------
> -------- CenturyLink Cloud: The Leader in Enterprise Cloud Services.
> Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical 
> Workloads, Development Environments & Everything In Between.
> Get a Quote or Start a Free Trial Today.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.
> clktrk _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users
>
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For Critical 
Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today. 
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to