Automatic account creation is now enabled. Captcha authentication required for account creation and editing unless you are trusted here.

Vista and WiX

From WiX Wiki at MindCapers

Jump to: navigation, search

Contents

UAC

Question about Install Privileges

When i have a ALLUSER=1 installation and i use the attribute InstallPrivileges='elevated' on my Package element, what does this mean?

  1. - The package will be run elevated, the user installing the MSI must have sufficient rights to install this MSI (needs to write HKLM for example) OR AlwaysInstallElevated-policy must apply (HKLM or HKCU)
  2. - The package will be run elevated, it doesn't care about what rights the user has; it will be installed.
Answer
  1. -- a package marked as requiring elevated privileges is a request; the user must be an admin or on Vista, confirm the elevation prompt or provide admin credentials.

Vista Consent Dialog

Question

I want my WIX generated MSI to pop-up Vista Consent Dialog. How can I do it? Interestingly the dialog pops up for un-install, but NOT for install.

Answer

MSI shows elevation consent if the launching process isn't already elevated and the Package/@InstallPrivileges attribute isn't set to limited. You'll get it on uninstall because Programs & Features isn't elevated by default from the shell (unless UAC is turned off).


Custom Actions

Question

Is there a way to run *.exe's as CustomActions with full admin privileges during setup in Vista? Impersonate="no" doesn't work, and I am assuming I am not the first person hitting this issue. J

Answer

To run CAs as the system account, you need @Impersonate="no" and @Execute="deferred" both.


Per User to Per Machine

A true per-user app (i.e., that doesn't require elevation) can't be converted to a true per-machine app except via a major upgrade that uninstalls and reinstalls entirely.


Problems about running a msi against Vista

1. The NoImpersonate bit only affects deferred custom actions. This implies you're launching applications from a deferred CA. Immediate CAs typically after InstallFinalize are best suited for this (like displaying a web page or something).

2. Signing is really only necessary for the MSI, and that provides the publisher in the dialog. You can't get rid of the dialog, though, for an MSI install. You can only prevent this from popping up for patches if you follow instructions in http://msdn2.microsoft.com/en-us/library/aa372388.aspx.

3. Public properties passed from client (how you invoke your installation transaction) to the server must be listed in the SecureCustomProperties property or they will be ignored. See http://msdn2.microsoft.com/en-us/library/aa371571.aspx for more information.

Heath Stewart Technical Lead Deployment Technology Group, Microsoft http://blogs.msdn.com/heaths

Personal tools