Depending on the installed structure of your application, it is sometimes necessary for elevated user privileges to accomplish a software update. For example, a standard user cannot replace a file in the Program Files directory. In these circumstances it is necessary to elevate privileges in order to execute an update.
AppLife Update Windows Service
If you are using an AppLife Update action list to update your software, you can elevate privileges by configuring your software to use the AppLife Update Windows Service. This windows service runs under the context of the local system account.
The AppLife Update Service can ONLY be used with an AppLife Update action list. Msi based updates can utilize the elevation features of the Windows Installer. AppLife Update provides no means to elevate privileges during a custom exe update.
To use the AppLife Update Windows Service:
1. Configure your application by setting the ElevationType property of your Update Controller to AppLifeUpdateService.
2. Add the AppLife Update Windows Service to your application installer. The merge module will install the service and register your application for use. Only registered applications can interact with the service.
When your application distributes the AppLife Update Windows Service and is properly configured to utilize the service, the update engine will execute your update packages under the security context of the Local System. The AppLife Update engine user interface communicates with the service to provide your users progress indication as the service executes your update package.
Applications that utilize the AppLife Update Windows Service will not be prompted by the Windows Vista User Account Control (UAC) when an update is executed.
All of the built-in update actions perform identity impersonation to ensure that any update activity that targets the current user profile will be properly executed by the AppLife Update Windows Service. Custom actions that you create can gain access to the Windows Identity of the user who initiated the update using the Target Application Identity information on the Update Context object. More information on this topic is available in the API Reference.