installationwindows-installeradvanced-installer

Executing multiple exe at the end of installation in Advanced Installer


I want to execute two files after installation is finished but i don't want them to shows UAC dialogs. I have tried to use maximum execution level but its not working.


Solution

  • I am assuming that the executables are launched outside of the "Install Execute" sequence. I am guessing you are trying to launch these executables when the user clicks on the "Finish" button on the Installation Finished dialog.

    With UAC, applications and tasks always run in the security context of a non-administrator account, unless an administrator specifically authorizes administrator-level access to the system. i.e even if you are logged in as an administrator, any application that you run does not run with full administrative privileges. Each application that requires the administrator access token must prompt the administrator for consent. When an administrator logs on, two separate access tokens are created for the user: a standard user access token and an administrator access token.

    The standard user access token contains the same user-specific information as the administrator access token, but the administrative Windows privileges and SIDs are removed. The standard user access token is used to start applications. The standard user access token is then used to display the desktop (Explorer.exe). Explorer.exe is the parent process from which all other user-initiated processes inherit their access token. As a result, all applications run as a standard user unless a user provides consent or credentials to approve an application to use a full administrative access token.

    In your case, I am assuming that the msi package is being installed from a non elevated command prompt. Hence, the msi package is being run with standard user privileges. So, any child processes which are spawned from this msi package outside of the InstallExecute sequence will run with standard user privileges.

    For an application to be UAC compliant, the application needs to specify the "requested execution level" in the application manifest. Requested execution levels specify the privileges required for an application.

    What is the requested execution level in the application manifest for your executables? You can verify the requested execution level specified in the embedded manifest of your exectuable by making use of a tool from the Sysinternals suite called "sigcheck.exe".

    Verify the requested execution level. I am thinking that its set to "requireAdministrator" because of which you are being prompted for elevation. Change this to "asInvoker" and then your problem should be solved.

    You can read more about UAC at the below location:

    https://technet.microsoft.com/en-us/library/jj574202.aspx