I believe my question and the issue I was having wasn't explained clear enough. 
Looking back I was trying to be succinct and missed out on explaining the 
details of what was happening and what I had tried in order to fix it.

To be clear, in the past with the per-user installs I created the user indeed 
received a UAC dialog and they needed to click Yes to elevate the privileges so 
it would install to Program Files. 

>From the feedback I received here I now understand that the use of the term 
>"per-user install" is not entirely accurate as it installs to the user's 
>roaming directory and Program Files. I used the term because of the 
>InstallScope attribute is set to "perUser". I need to set the attribute to 
>perUser because if I use perMachine the installer will not update my earlier 
>installation but will instead install side-by-side.

The issue I was having and why I ask the question here was with using Wix the 
installer would run and I get the UAC dialog as expected and I click Yes. 
However when it starts to copy files across I get a message saying "the 
installer has insufficient privileges to access this directory" and the message 
is pointing to the Program Files/My Application directory. This was even though 
I was getting the UAC dialog at the start of the installation.

I tried Googling this for a couple of days and I tried everything I could find 
but still was denied access to Program Files. It was only when I switched the 
Package attribute InstallScope to "perMachine" that the installation went 
through and as I mentioned that won't work for me as I need to update a perUser 
installation. 
  
BTW I haven't mentioned it but I do have InstallPrivileges set to "elevated". 
   
Thanks for all the comments and feedback on this. I am taking it all in and I 
obviously have a lot more to learn about installations.
 

-----Original Message-----
From: Phil Wilson [mailto:phildgwil...@gmail.com] 
Sent: Tuesday, 12 May 2015 8:12 a.m.
To: General discussion about the WiX toolset.
Subject: Re: [WiX-users] Per-User Previlage To Write to Program Files

More accurate to say that an admin user gets a UAC prompt to install to the 
desired location (ProgramFiles), and the limited user just gets directed to the 
ProgramData folder.without them knowing, as evidenced
by this thread.   It's the IS attempt to build an install like this: :

https://msdn.microsoft.com/en-us/library/windows/desktop/dd408068(v=vs.85).aspx

and have a setup for the "just make it work" scenario. WiX's default behavior 
is to avoid the indeterminate mess of not knowing where you're installing and 
maybe what the context is, per user or per machine. The results are usually not 
optimal in a per user install (being polite) when it comes to servicing with 
upgrades, patches, integrating with other products and so on. If you built the 
VS 2013 setup with all that non-deterministic behavior (with its multiple MSI
files) you'd get a product that didn't work; redistributables unusable etc.

So if you want to install to the ProgramFiles folder (and maybe your app 
requires elevation, or you're installing services, or maybe you require shared 
files in CommonFiles and any other number of scenarios) then you will require 
elevation, or an admin blessed GPO type of install, or over the shoulder UAC 
prompt. If you want limited users to be able to install and use your app then 
install to somewhere like ProgramData. In both cases you can still be per 
machine. I am not aware of a rule that says limited users can't install a per 
machine app, they just need to explicitly install to non-restricted locations.
I think that LE install is per user because there is no evidence of ALLUSERS 
being set to anything, and no MSIINSTALLERPERUSER property values in the log.

It depends what you want, and in general I think it's fair to say that most 
people want an install that does what it's told to do. At this point it's about 
best practices, and deterministic installs that are fit for the enterprise. I 
don't believe InstallShirld LE setups (or Visual Studio installer projects) are 
fit for that.


---------------
Phil Wilson


On Mon, May 11, 2015 at 10:28 AM, Jeremy Farrell <jeremy.farr...@oracle.com> 
wrote:
> As I understand this, the original problem wasn't explained at all 
> clearly. The issue is not about a limited user being unable to install 
> to Program Files. The issue is that with the IS per-user installer, 
> the user gets offered a UAC prompt and the installation proceeds if he 
> authenticates correctly. With the equivalent default WiX per-user 
> installer, he just gets told that he can't install there (that is, he 
> doesn't get offered a UAC prompt) and he can't install.
>
> If my understanding is wrong, sorry for adding to the confusion ...
>
> On 11/05/2015 17:43, Phil Wilson wrote:
>> Well it asked me for elevation on my system and installed to 
>> ProgramFiles. It also doesn't actually TELL you or show you the 
>> install destination and there is no browse dialog.  So Rob is 
>> correct, and it's as I basically said before, it's one of those IS 
>> packages that redirects to ProgramData by calling a custom action 
>> called SetAllUsersProfile2k. If a limited user installs it then it 
>> won't go to ProgramFiles folder.
>> ---------------
>> Phil Wilson
>>
>>
>> On Mon, May 11, 2015 at 9:05 AM, Rob Mensching <r...@firegiant.com> wrote:
>>> In this case, a verbose log file would be more useful.
>>>
>>>
>>> -----Original Message-----
>>> From: Scott Ferguson [mailto:scott.fergu...@a2ktechnologies.co.nz]
>>> Sent: Monday, May 11, 2015 12:21 AM
>>>
>>> Not sure about the internal filters that might be set and I wouldn't know 
>>> what to look for using Orca to view the .msi file to see what might be 
>>> allowing me to install to Program Files in a per-user install. I do know it 
>>> is installing to Program Files and not Program Data.
>>>
>>> If you are curious and wanted to have a look I have created a simple test 
>>> app and an InstallShield LE installer where the ALLUSERS switch is set to 
>>> per-user and the data installs to Program Files. The resulting .msi file is 
>>> in the top level of the zip. I have zipped them and placed them in dropbox 
>>> if you wanted to download.
>>>
>>> This is a x64 installer.: 
>>> https://www.dropbox.com/s/f78ijq0z8qpuwn3/Test%20Project.zip?dl=0
>
> --
> J. J. Farrell
>
> ----------------------------------------------------------------------
> -------- One dashboard for servers and applications across 
> Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 
> 50+ applications Performance metrics, stats and reports that give you 
> Actionable Insights Deep dive visibility with transaction tracing 
> using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> WiX-users mailing list
> WiX-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud Widest 
out-of-the-box monitoring support with 50+ applications Performance metrics, 
stats and reports that give you Actionable Insights Deep dive visibility with 
transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to