Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PerUser install defaults to PerMachine in WixUI_AdvancedUI #2376

Closed
wixbot opened this issue Oct 26, 2009 · 2 comments
Closed

PerUser install defaults to PerMachine in WixUI_AdvancedUI #2376

wixbot opened this issue Oct 26, 2009 · 2 comments
Milestone

Comments

@wixbot
Copy link

wixbot commented Oct 26, 2009

When a limited user does an install, he is only able to do a PerUser install. However the default setting stays at PerMachine and causes the failure.

See email thread below:

From: Blair [osito@live.com]
Sent: October-24-09 2:34 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Installation to limited user account failing on
WixUI_Advanced

Follow Up Flag: Follow up
Flag Status: Flagged

If your default is based on Privileged you have a good solution for defaulting
perUser or perMachine.

Since the default value for the radio box is perMachine, I agree that the next
button should either set that property to perUser when the Next button is
clicked if "NOT Privileged" before it evaluates that property to set ALLUSERS,
or it should simply condition setting ALLUSERS (and
APPLICATIONFOLDER) with "Privileged" or "NOT Privileged" along with
WixAppFolder.

I think it does warrant a bug. Please go ahead and file one. Include this
email thread.

-----Original Message-----
From: Andreas Mertens [mailto:andreasm@nvisionideas.com]
Sent: Saturday, October 24, 2009 7:57 AM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Installation to limited user account failing on
WixUI_Advanced

I created an installer based on the WixUI_Advanced Dialog Set, and I am
running into the following problem.

On XP SP3, when installing to a limited user account (i.e. not admin, not
Privileged), just selecting the defaults, the installation starts and then
fails, saying you lack admin privileges. I have configured to support both
admin and limited account installs:

When you get to the InstallScopeDlg, you do not see the choices of
installation (all users vs. current user), but get the message:
(from
WixUI_en-us.wxl)
[ProductName] will be installed in a per-user folder and be available
just for your user account. You do not need local Administrator
privileges.

Which is fine. So I expect that it should install to the user-defined
location. Instead, based on the log files, ALLUSERS gets set to 1 and it
attempts to perform an all users install anyways, which is causing the
failure.

I have tested this with an admin account, selecting current user install and
all does work fine then.

I did dig into this, and found that the issue is with the default setting for
the radio buttons in InstallScopeDlg. These are defined as follows:





Privileged AND
(!(wix.WixUISupportPerUser) AND !(wix.WixUISupportPerMachine))

For some reason when the .MSI is compiled, the default value for WixAppFolder
is set to "WixPerMachineFolder". This is fine when the radio buttons are
displayed, as the user can change them. When they are not displayed (as in
the case I describe above), because the setting for WixAppFolder is still set
to WixPerMachineFolder" when the Next button is processed it sets ALLUSERS to
1 and then attempts to install for all users.

I did come up with a fix in my code as follows (in my version of
WixUI_Advanced.wxs):

...
<CustomAction Id="WixSetInstallThisUser" Property="WixAppFolder"

Value="WixPerUserFolder" Execute="immediate" />

...

<InstallExecuteSequence>
    ...
    <Custom Action="WixSetInstallThisUser"

After="WixSetPerMachineFolder">NOT Privileged
Privileged


...
NOT Privileged
Privileged

So first off, is this a known issue? Is there a better way of dealing with
this problem than I am aware of? Has a patch already been released?
Second, does this fix look correct? I am still learning all the nuances of
Wix and MSI coding, and would be happy to hear any suggestions on doing this
better.

Thanks,

Andreas Mertens


Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the
only developer event you need to attend this year. Jumpstart your developing
skills, take BlackBerry mobile applications to market and stay ahead of the
curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference


WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference


WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Originally opened by andreasmertens from http://sourceforge.net/p/wix/bugs/1859/

@wixbot
Copy link
Author

wixbot commented Sep 15, 2012

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).

@wixbot
Copy link
Author

wixbot commented Sep 15, 2012

Email dump

@wixbot wixbot added this to the v3.5 milestone Dec 20, 2015
@wixbot wixbot closed this as completed Dec 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant