11 Vote

Lazarus: Compile Application that it is always Run as Administrator

Question by Guest | Last update on 2021-11-02 | Created on 2014-03-15

In Windows, it is possible to right click on an application (EXE) and to select "Run as Administrator" from the context menu.

I would like to compile a program with Lazarus in a way, that it is always and automatically executed with administrator rights. In other words, this information should be directly written into the EXE file.

Is this possible somehow? Thank you very much for your help.

ReplyPositiveNegative
1Best Answer5 Votes

No problem. Just got to the project options (Shift+CTRL+F11 or Project > Project Options). There, you can make the settings for this.

Directly on the first page, you can find a drop-down box "Execution Level" standing on "as invoker" by default.

If you change this to "require administrator", your application will always be executed as administrator after you have compiled it.
Last update on 2021-11-02 | Created on 2014-03-16

ReplyPositive Negative
Reply

Related Topics

Important Note

Please note: The contributions published on askingbox.com are contributions of users and should not substitute professional advice. They are not verified by independents and do not necessarily reflect the opinion of askingbox.com. Learn more.

Participate

Ask your own question or write your own article on askingbox.com. That’s how it’s done.