What I've seen recommended (I think from an MSI team member) is to have a type 19 custom action in the Execute sequence that checks Privileged, because by then you're elevated or not. There is also MSIUSEREALADMINDETECTION, but it generally seems like a bad idea to try to preserve old behavior unless there's a good reason.
Phil Wilson -----Original Message----- From: Alan Sinclair [mailto:alan.sincl...@citrix.com] Sent: Thursday, August 05, 2010 2:33 PM To: General discussion for Windows Installer XML toolset. Subject: [WiX-users] how can I check for FULL admin privileges The MSI I'm working has an immediate custom action (after InstallFinalize) which writes to HKLM. On Win7 etc it fails even if the logged-on user is an admin unless it's run from an Admin Command Prompt (msiexec /i ...). How can I check for FULL admin privileges? Can it be done with "Windows Installer functions"? Launch Condition "Privileged" is not sufficient, as it allows install started by double-click in Explorer to proceed for admin users -- the UAC prompt comes up then the install fails at the HKLM write. Unfortunately the custom action is in a module shared with other packages, so I can't change it to run deferred/no-impersonate. The fall-back position is adding a DLL to get a SID and check that for membership in the Administrators group, but a native Windows Installer or WiX solution would be much preferable. Thanks ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users *** Confidentiality Notice: This e-mail, including any associated or attached files, is intended solely for the individual or entity to which it is addressed. This e-mail is confidential and may well also be legally privileged. If you have received it in error, you are on notice of its status. Please notify the sender immediately by reply e-mail and then delete this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any other person. This email comes from a division of the Invensys Group, owned by Invensys plc, which is a company registered in England and Wales with its registered office at Portland House, Bressenden Place, London, SW1E 5BF (Registered number 166023). For a list of European legal entities within the Invensys Group, please go to http://www.invensys.com/legal/default.asp?top_nav_id=77&nav_id=80&prev_id=77. You may contact Invensys plc on +44 (0)20 7821 3848 or e-mail inet.hqhelpd...@invensys.com. This e-mail and any attachments thereto may be subject to the terms of any agreements between Invensys (and/or its subsidiaries and affiliates) and the recipient (and/or its subsidiaries and affiliates). ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users