[wix-users] Custom action with optional elevation
Frederic.Bruneteau at vasco.com
Fri Aug 5 07:19:37 PDT 2016
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) ?
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.
More information about the wix-users