Recent

Author Topic: Windows 7 64 bit - Problem requesting elevated privileges  (Read 8001 times)

josegarciasilva

  • Newbie
  • Posts: 1
Windows 7 64 bit - Problem requesting elevated privileges
« on: March 16, 2010, 07:49:06 pm »
Hi all,

I've just started porting a Delphi backup program to FPC, the intention being to produce a 64 bit executable. The program needs to run with elevated privileges in order to use the Volume Shadow Service features of Windows.

In Delphi, I simply include a resource file with the familiar xml file:

[...]
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
                <security>
                        <requestedPrivileges>
                                <requestedExecutionLevel
                                       level="requireAdministrator"
                                       uiAccess="false"/>
                        </requestedPrivileges>
                </security>
        </trustInfo>
[...]

All my attempts today to include a similar resource have failed, mainly because the resource editor I have been using only works on 32 bit resources (Resource Hacker).

Could someone provide me with some instructions on how to go about adding this resource to the *.lrs created by Lazarus/FPC?

Any help or hints would be greatly appreciated.

José

lainz

  • Guest
Re: Windows 7 64 bit - Problem requesting elevated privileges
« Reply #1 on: April 02, 2012, 09:40:13 pm »
I know this is an old thread, but finally Lazarus svn 1.1 has the option to select the privileges and if is the program using UIAcces. Those can be set in the project options.

Thanks the people in the bugtracker for solving this =)

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: Windows 7 64 bit - Problem requesting elevated privileges
« Reply #2 on: April 03, 2012, 08:39:58 am »
Also, it was possible to do this in previous versions, but you'd have to edit the manifest.xml file by hand. I remember doing it for an older version and it worked.
See e.g. here:
http://www.lazarus.freepascal.org/index.php?topic=13620.msg71469#msg71469

... but if you're on the new Lazarus, just click some buttons & voila ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified