Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to ensure the setup program will run with administrator rights?

Tags:

inno-setup

If I create setup package using Inno Setup, will the setup program have administrator privileges allowing it to register DLLs etc. ?

Also, if the setup package executes a program as part of its operations, will that program be run with the administrator rights ?

like image 727
Craig Johnston Avatar asked Oct 27 '10 06:10

Craig Johnston


1 Answers

This is controlled via the PrivilegesRequired directive.

When set to admin (the default) or poweruser, Setup will always run with administrative privileges. If Setup was started by an unprivileged user, Windows will ask for the password to an account that has administrative privileges, and Setup will then run under that account.

If the setup executes a program from the [Run] section, then you can control the privileges of the spawned process with the runascurrentuser and runasoriginaluser flags.

like image 68
splash Avatar answered Sep 20 '22 21:09

splash