[wix-users] Custom action with optional elevation
Frederic.Bruneteau at vasco.com
Sat Aug 6 01:00:43 PDT 2016
Yes, I declared the MSI not elevated (“perUser” and “limited”).
Is it possible to elevate if necessary (decided at runtime) ?
EXPORT CONTROL NOTICE: VASCO and the VASCO products, software, deliverables, technical information, and related documents and materials (“VASCO Products”) are subject to EU and US trade control laws and regulations. VASCO Products may not be exported, reexported, or transferred to, or otherwise used in, certain sanctioned countries (currently: Crimea region of Ukraine, Cuba, Iran, North Korea, Sudan, and Syria), or by certain prohibited parties contrary to EU and US trade controls.
CONFIDENTIALITY NOTICE: Information in this document, including any attachment, is confidential and is intended only for the addressee. Any unauthorized disclosure, copying, or distribution of this information is strictly prohibited. If you received this transmittal in error, please contact the sender immediately and delete this transmittal from your computer or other data bank.
> On 05 Aug 2016, at 18:12, Rob Mensching <rob at firegiant.com> wrote:
> I believe you declared that your MSI will not elevate. Windows Installer should respect that and not elevate.
> Short replies here. Complete answers over there: http://www.firegiant.com/
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Frédéric Bruneteau
> Sent: Friday, August 5, 2016 7:20 AM
> To: wix-users at lists.wixtoolset.org
> Subject: [wix-users] Custom action with optional elevation
> I have an installer launched as user (not Admin):
> <?define InstallScope="perUser" ?>
> <?define InstallPrivileges="limited" ?>
> I implemented a custom action that could require elevation (Administrative Privileges) to update a file of the system.
> The installer should ask Admin privileges only if it's necessary.
> As described in CustomAction documentation (http://wixtoolset.org/documentation/manual/v3/xsd/wix/customaction.html)
> the custom action uses attributes "Execute='deferred'" and "Impersonate='no’" :
> <CustomAction Id='UpdateSystemFile' BinaryKey='CustomAction' DllEntry='UpdateSystemFile' Execute='deferred' Impersonate='no' Return='check'/>
> In the use case that requires elevation, I don't see any dialog box indicating the machine can change or asking Admin credentials, and the custom action does update the system file.
> Is there a specific API to ask elevation in a custom action ?
> Could MSI change dynamically (at runtime) its privileges from user (limited) to admin (elevated) ?
> Best Regards,
> Frédéric Bruneteau
> WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
More information about the wix-users