[wix-users] Prompt for Windows Credentials in Wix for Admin Privileges

Habib Salim habib at hsalim.com
Fri Nov 24 11:36:53 PST 2017

This forum/mailing list has been a great help to me.  There are so many
knowledgeable people who help so freely.

I have been following this thread with some interest.  Although I don't
have a solution to the problem itself (I am barely able to get by and am
no expert)
I've been in similar situations before - struggling for an answer, may not
be asking the question the right way, and not know how or what to ask.    
I'll try to ask the question differently on Ven's behalf.  To me, he is
doing the best he can, and perhaps we can help by asking a few questions

Ven wants any user to be able to install the application by executing the
He sets InstallPrivileges="elevated", expecting that if the user does not
have admin rights, the package would prompt for admin credentials.
It does not appear that he wants to capture/validate/store this - he just
wants the installer to install with elevated privileges.

Kaveesh  Davora replied that MSI auto-elevates and it is not necessary to
check for this.  Does that mean setting Install Privileges is not
necessary, as Joe Casale says?
Does that mean that setting InstallPrivileges should not be set?

Walter, Ven wants the installer to prompt for escalation.  What does he
need to do to get the installer to display the admin login prompt? 

The batch file is Ven's attempt to find a workaround.  

Ven, Do you have any custom actions in your installer that need elevated
privileges?   You probably found this already.  does it help?

Happy Shopping to all.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
Of Edwin Castro via wix-users
Sent: Friday, November 24, 2017 1:35 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Edwin Castro <egcastr at gmail.com>
Subject: Re: [wix-users] Prompt for Windows Credentials in Wix for Admin

All standard actions will do The Right Thing (R). If you're not getting
prompted then you're doing something else wrong, like running custom
actions requiring elevation in immediate mode.

You should consider asking why something works or doesn't work the way you
expect instead of asking how to implement a specific solution to a problem
you have not fully described. This is especially true when experts are
telling you that you're trying to do something bad, not recommended, or
not a best practice.

When asking why, you must explain what you are doing and why as well as
what you expect and why you think you are observing behavior that doesn't
match your expectations. This information is critical for providing the
best advice for your specific scenario.

If you ask about a bad solution, then all you'll get is a lot of responses
not to do it. Remember the customer is not always right, especially when
highly specialized technology is involved. The Windows Installer is *not*
a scripting language.

Edwin G. Castro

On Nov 24, 2017 01:01, "Ven H via wix-users"
<wix-users at lists.wixtoolset.org>

Thanks a lot for your response Nir. What you are referring to is Custom
Action, right? I also have Registry key creation, Adding files to Program
Files location, Custom Services, IIS setting changes (creating sites and
app pools), Database deployment and so on. I am not sure how to handle
these without Admin privileges.


On Fri, Nov 24, 2017 at 1:20 PM, Nir Bar via wix-users <
wix-users at lists.wixtoolset.org> wrote:

> You should author any action that requries admin privileges as 
> deferred with Impersonate="no"This will ensure that admin rights are 
> granted for these actions without needing the LaunchCondition.
> --Independent WiX Expert. Creator of-
> JetBA: WPF Bootstrapper User Interface Framework
> JetBA++: Native Qt Bootstrapper User Interface Framework
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant 
> http://www.firegiant.com/

WiX Toolset Users Mailing List provided by FireGiant

WiX Toolset Users Mailing List provided by FireGiant

More information about the wix-users mailing list