delphidelphi-7manifestadministrator

Adding manifest for admin rights request


I have an application that writes program settings to the windows registry that is absolutely necessary so.storing to a file is not an option.

To simplify this, I would like to give an "admin privileges" nag screen instead of trying to explain how to right click on the program file/short cut.

I found a reasonably good article but I receive a duplicate resource error after adding my own resource file for the manifest.

This is supposedly due to a conflict with the internal manifest and to resolve the issue I see a lot of comments suggesting "enable runtime themes" to be disabled in project options. I have gone through every menu but cannot find it and I've now been told that it may not be available in Delphi 7 and was introduced in later versions.

How can I add my own manifest?


Solution

  • In newer versions of Delphi this is no longer necessary.
    Under Project Options, then Application, there is a section for the manifest:

    Manifest options
    Screenshot from version 10.2.1 Tokyo

    enter image description here Screenshot from version 11.1.3 Alexandria

    This automatically takes care of the XP manifest mentioned as a warning at the bottom of Kobik's answer.

    I do not know from which Delphi version this was available.
    (Free free to edit this answer if you know). (Edit Ian Murphy Feb 2019: It is not available in XE2)