Recent

Author Topic: Execution level  (Read 1495 times)

badmintonfan

  • New Member
  • *
  • Posts: 49
Execution level
« on: January 05, 2024, 11:40:17 am »
When I selected require administrator for Execution level, I have to choose Build or Compile in stead of Run otherwise the error message will release
« Last Edit: January 05, 2024, 11:41:54 am by badmintonfan »

dseligo

  • Hero Member
  • *****
  • Posts: 1443
Re: Execution level
« Reply #1 on: January 05, 2024, 12:01:24 pm »
What Lazarus version do you use, what debugger do you use, on what platform are you (versions too), what bitness is Lazarus, what is target of your program, bitness of target?

badmintonfan

  • New Member
  • *
  • Posts: 49
Re: Execution level
« Reply #2 on: January 05, 2024, 12:32:47 pm »
What Lazarus version do you use, what debugger do you use, on what platform are you (versions too), what bitness is Lazarus, what is target of your program, bitness of target?
Lazarus 3.0
Integrated debugger
Windows 10 X64
« Last Edit: January 05, 2024, 12:36:31 pm by badmintonfan »

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10668
  • Debugger - SynEdit - and more
    • wiki
Re: Execution level
« Reply #3 on: January 05, 2024, 02:15:39 pm »
Have you tried running the IDE itself as admin?

I just tested with an IDE as normal user:
- "Run without debugger" fails silently
- gdb also can not launch an app that is marked to require admin privileges.

I haven't done any research, if/how a non admin app (e.g., the IDE running as normal user) can start an app that needs admin rights. It may be possible, but it needs research.
There are some functions in the WinApi, but I don't know if they will allow a non privileged debugger to be attached.
I would expect that the debugger must be privileged as well.

If you don't want the IDE to be privileged, then you probably can run gdbserver (from a privileged command line), and connect to that. (using the IDE gdb server backend).

Thaddy

  • Hero Member
  • *****
  • Posts: 16363
  • Censorship about opinions does not belong here.
Re: Execution level
« Reply #4 on: January 05, 2024, 02:22:46 pm »
Question:
Is the Lazarus IDE itself compiled with a proper manifest? Otherwise the binary will run OK with the settings outside of Lazarus, but is hardly debuggable. During use of the IDE, the compiled program is a child process of the IDE so it inherits its rights..
This is just for windows of course.
« Last Edit: January 05, 2024, 02:33:45 pm by Thaddy »
There is nothing wrong with being blunt. At a minimum it is also honest.

badmintonfan

  • New Member
  • *
  • Posts: 49
Re: Execution level
« Reply #5 on: January 06, 2024, 03:14:32 am »
Have you tried running the IDE itself as admin?
I tested it as you suggestion just now,yes,the IDE itselft has to run as admin,otherwise the error message will release.
Thank you

 

TinyPortal © 2005-2018