How can I make the installer Run as admin

26,866

Solution 1

You need to set the execution level to "Require Administrator" from the project options. This option will be stored in the manifest file included in your setup package and it will make the installer to act as it was launched with the option "Run as administrator" on machines that run on Vista or a newer OS. Older versions of Windows will ignore the manifest file.

Solution 2

With InstallShield 2008 (14.0) go to Media -> Releases then select tab Setup.exe and change the item Required Execution Level to Administrator

enter image description here

Share:
26,866
JijeshKV
Author by

JijeshKV

Updated on July 05, 2022

Comments

  • JijeshKV
    JijeshKV almost 2 years

    My application has an installer built in installshield. But for proper working of installation process in vista Win 7 etc. the installer should be run as administrator. (Even though the user has admin previlege he should select the 'Run as Administrator' option in the menu on rightclicking the installer exe)

    How can I make my installer to prompt that it should be always run as administrator.

    Thanks in advance...

  • liorafar
    liorafar over 8 years
    And if my installer is an MSI and NOT setup.exe?
  • liorafar
    liorafar over 8 years
    @Bogdan Mitrache And if my installer is an MSI and NOT setup.exe?
  • Bogdan Mitrache
    Bogdan Mitrache over 8 years
    @liorafar An MSI is not an executable file, it is just a standard Windows Installer database that is loaded by an executable from the system, i.e. msiexec.exe. So the answer is unfortunately, no. The manifest which specifies the execution level can be only embed into an EXE bootstrapper that launches your MSI (by calling msiexec.exe in in the background and passing its execution level too). An MSI can only be executed as admin from an elevated command prompt if it is manually launched, but never by simply double clicking it.
  • liorafar
    liorafar over 8 years
    @Bogdan Mitrache thanks for your answer. this is what actually we're doing but I thought there is more elegant way.