Any reason why you need to write to the Registry using a Custom Action
instead of using RegistryValue/RegistryKey elements? Using those would
leave msiexec to deal with elevation instead of you having to even think
about it. Sounds to me like your code doesn't follow UAC guidelines & is
failing for a very good reason. 

Palbinder Sandher 
Software Deployment & IT Administrator
T: +44 (0) 141 945 8500 
F: +44 (0) 141 945 8501 

http://www.iesve.com 
**Design, Simulate + Innovate with the <Virtual Environment>**
Integrated Environmental Solutions Limited. Registered in Scotland No.
SC151456 
Registered Office - Helix Building, West Of Scotland Science Park,
Glasgow G20 0SP
Email Disclaimer

-----Original Message-----
From: Wilson, Phil [mailto:phil.wil...@invensys.com] 
Sent: 05 August 2010 22:56
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] how can I check for FULL admin privileges

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_i
d=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



------------------------------------------------------------------------------
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

Reply via email to