In XP: you either are an administrator or you are not. It is simple.

In Vista with UAC turned off: Same as XP.

In Vista with UAC turned on: Administrators are "not" an administrator until
they elevate (via the consent dialog). Non-administrators can also elevate
via the same mechanism by supplying an administrator's credentials.

To prevent breaking older installation packages, on Vista without
MSIUSEREALADMINDETECTION set, AdminUser (and Privileged) are always set,
since the user can (in theory) always supply the credentials needed to the
consent dialog.

Privileged means that either the user can install or would be able to
install by supplying credentials. AdminUser (if MSIUSERREALADMINDETECTION is
set to 1) means that you have a token that has the administrator's groups
privileges enabled. The non-elevated token of the your admin doesn't have
those set.

Typically, what people have done is not set MSIUSEREALADMINDETECTION, test
for the condition of "Privileged", and expect that the following happens:
If the installation could succeed on XP, the condition passes, otherwise it
fails.
The condition always passes on Vista (on the assumption that the user will
later see the consent dialog), and the user must navigate the consent dialog
in order to complete the installation.

I'm sure you have a justification to not allow Vista standard users from
attempting perMachine installations, but the reason for the changes above
was to enable what is called "over-the-shoulder" permission: standard users
starts installation, gets consent dialog, administrator comes by and
supplies credentials, installation completes. That is easier than the XP
model of logout, login as admin, run installation, logout, log back in as
user.

-----Original Message-----
From: warne warne [mailto:warne...@hotmail.com] 
Sent: Friday, September 25, 2009 1:25 PM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] Vista Standard User and perMachine install


 

Thanks for the help, I tried it without InstallPrivileges="elevated" and it
almost got it to work. Both methods ('Condition' element and type 19 custom
action) appear to have the same net effect.

XP works great and stops the install if not an admin. That fine and is what
I want. Vista however is different. If logged in as admin, double clicking
the msi to launch the install doesn't recognise Im admin & stops with my
error message. Under the same admin login, if I open a command prompt as
administrator and run msiexec /i myinstall.msi , the installer now detects
admin and continues fine. Great! But what sane user is going to want to run
an installer from the command prompt as administrator ;(

Here is my Custom action

 <InstallUISequence>
       <Custom Action="IsPrivileged" Before="LaunchConditions">Not
AdminUser</Custom>
       <Show Dialog="OldVerDetected"
After="FindRelatedProducts">REMOVEOLDPRODUCT</Show>
 </InstallUISequence>

Is UISequence the correct place for this stuff? Also note I need to set the
MSIUSEREALADMINDETECTION property to 1 for this to work.

After trying all this it seems (in this case) msi cannot detect if I am an
admin user in Vista. What about creating a bootsrap setup.exe which runs my
installer using msiexec like I did the command prompt. Is that whats
normally done to get round this type of problem?

Lastly I noticed when using:

<Condition Message="You must be an admin to install this product.">Not
AdminUser</Condition>

No Launch Condition Table is created when I open the msi in Orca, even
though the condition seems to work (at least for XP and vista standard
user). Why is that?

 
                                          
_________________________________________________________________
With Windows Live, you can organise, edit, and share your photos.
http://clk.atdmt.com/UKM/go/134665338/direct/01/
----------------------------------------------------------------------------
--
Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; 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&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to