Search code examples
installshieldinstallscriptbasic-msi

How to set Required Execution Level to Administrator for Basic MSI project type with MSI file


Can someone help me set the Required Execution Level to Administrator for an MSI file? (I mean, when double-clicking the MSI file, it should also show the UAC dialog to confirm Administrator privileges). I'm using InstallShield 2022. Project type: Basic MSI. Output type: MSI

I can only use Is(USER_ADMINISTRATOR,""); to check if the user has admin rights. I haven't found a way to set the Required Execution Level to Administrator.


Solution

  • You cannot set the execution level for an MSI. You can only set it for EXE files. The UAC execution level is an option specified in the manifest files that gets embedded in the EXE files. The OS reads that manifest when you try to execute to EXE.

    The only way to set an execution level for an installer (MSI in your case) is to wrap it inside an EXE bootstrapper and configure the execution level for the bootstrapper.

    All professional setup authoring tools can generate an EXE, just check the output settings from your project.