Recent

Author Topic: [EXAMPLE] "Failed to execute: 740" Windows security issue  (Read 824 times)

What I can do

  • Full Member
  • ***
  • Posts: 152
[EXAMPLE] "Failed to execute: 740" Windows security issue
« on: March 03, 2025, 04:16:10 pm »
OS: Windows 10@64
Compiler: Lazarus 3.8
Project: new totally empty blank Application will not even compile
and produce this error
"Faild to start process 'MyProject.exe'
Error message: 740 "failed to execute :740""
Where do i look to find what is wrong?
« Last Edit: March 03, 2025, 04:49:03 pm by What I can do »

paule32

  • Sr. Member
  • ****
  • Posts: 381
Re: [compiling] error during compile
« Reply #1 on: March 03, 2025, 04:24:39 pm »
Error 740 means that it requires elevation to run. Meaning you must run it as administrator.
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

What I can do

  • Full Member
  • ***
  • Posts: 152
Re: [compiling] error during compile
« Reply #2 on: March 03, 2025, 04:47:57 pm »
Thank you, YES RClick Lazarus-> Property->Compatiable [X] Run as Administrator

korba812

  • Sr. Member
  • ****
  • Posts: 464
Re: [EXAMPLE] "Failed to execute: 740" Windows security issue
« Reply #3 on: March 03, 2025, 04:56:17 pm »
I would not run the development environment with administrator privileges until it is absolutely necessary. By default, Lazarus should not require such permissions so I would advise you to check your configuration, folder permissions or antivirus.

Thaddy

  • Hero Member
  • *****
  • Posts: 16770
  • Ceterum censeo Trump esse delendam
Re: [EXAMPLE] "Failed to execute: 740" Windows security issue
« Reply #4 on: March 03, 2025, 06:56:32 pm »
OS: Windows 10@64
Compiler: Lazarus 3.8
Lazarus is NOT the compiler. That is FPC. Lazarus is just an IDE and a sophisticated set of libraries.
You probably just need to add a manifest resource with the right elevation request.
How to do that has been explained so many times that I refuse to do it again.
On this forum alone well over a 100 times.
It just needs some reading and is not difficult.
Changing servers. thaddy.com may be temporary unreachable but restored when the domain name transfer is done.

jamie

  • Hero Member
  • *****
  • Posts: 6869
Re: [EXAMPLE] "Failed to execute: 740" Windows security issue
« Reply #5 on: March 03, 2025, 08:14:00 pm »
Items need to be installed in root folder along with output path in user space.
The only true wisdom is knowing you know nothing

What I can do

  • Full Member
  • ***
  • Posts: 152
Re: [EXAMPLE] "Failed to execute: 740" Windows security issue
« Reply #6 on: March 03, 2025, 09:09:50 pm »
"manifest" found a lot of stuff thanks for the heads up. To be truthful I'm not even sure I understand what a "manifest" is so I got some learning to do but for right now I have a project to finish. If setting admin rights to get through it then so be it. I already have a lot of control, I only code for myself on products that only I use with a computer system that I control every aspect about it. So the biggest danger I face is there is no layer to protect me from myself. I get that.

speter

  • Sr. Member
  • ****
  • Posts: 366
Re: [EXAMPLE] "Failed to execute: 740" Windows security issue
« Reply #7 on: March 03, 2025, 11:41:07 pm »
Did you install Lazarus / FPC under "c:\program files" or "c:\"? I believe the installation info recommends against "c:\program files" because of permission restrictions - which kinda sounds like your issue.

Good Luck.
S.
I climbed mighty mountains, and saw that they were actually tiny foothills. :)

paule32

  • Sr. Member
  • ****
  • Posts: 381
Re: [EXAMPLE] "Failed to execute: 740" Windows security issue
« Reply #8 on: March 04, 2025, 02:44:44 pm »
I assume, he use Delphi 7 - which can download on retro sites from the web.
but: this versions need admin rights because they have a Trojan included.
And this Trojan needs admin...

I am faced with this by my good paid anti-virus application.
because, it tell me the BANKERS Trojan.

So, I put down all my Delphi 7 Projects created with Delphi 7.
And jump to Lazarus/FPC

And I spoke: it was a good idea.
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

What I can do

  • Full Member
  • ***
  • Posts: 152
Re: [EXAMPLE] "Failed to execute: 740" Windows security issue
« Reply #9 on: March 06, 2025, 05:22:34 am »
speter no I installed on my USB3 2T drive like under
          "G:\t\Lazarus\development" I also use the short name if I have spaces.

paule32  "Delphi 7" no that was many years ago and it started with turbo pascal 6.0, then Delphi 5, up to Delphi 6 Enterprise, now to Lazarus (FPC) but my very first start was the TRS-80 Color Computer with basic with 4kb of RAM

paule32

  • Sr. Member
  • ****
  • Posts: 381
Re: [EXAMPLE] "Failed to execute: 740" Windows security issue
« Reply #10 on: March 06, 2025, 08:38:59 am »
instead using disk drives, try to connect the drives to a network share.

right click on the drive and click "properties".
in the popout dialog there must be a "sharing" tab.
there you can give the "share" a name and security rights (if the disk drive has the ntfs format - fat32 dont work).
then you can create a "network drive" or "network share" that points to:

\\DESKTOP\share

\\DESKTOP is then the Server (local (host) - or: 127.0.0.1 - or: 192.168.0.0)
\share        is then the Name to the sharing folder/drive

In your Applications, you can then use this share.
This are the pros.

The cons are:
if you plug off the usb drive, it is not guranteed that the drive Letter (G:) is used in the future.
Because USB dynamically gets free drive letters from System.

But (I don't know the exact procedure/process) you should be able to create a VB script or PowerShell script (with elevated rights policy) which can handle the disk drives connected to your System.
I don't know the exact name of this Windows Application, but it shall sounded like "Disk Management".
A Tool where you can set Path to your Volumes.

Use this Tool with caution !!!

Because you can easily format your connected drives/volumes if you have admin rights.
All data will be lost on the format command/menu item action !
MS-IIS - Internet Information Server, Apache, PHP/HTML/CSS, MinGW-32/64 MSys2 GNU C/C++ 13 (-stdc++20), FPC 3.2.2
A Friend in need, is a Friend indeed.

What I can do

  • Full Member
  • ***
  • Posts: 152
Re: [EXAMPLE] "Failed to execute: 740" Windows security issue
« Reply #11 on: March 11, 2025, 02:02:14 pm »
paule32 thank you for the tip but I have hard set the drive letters to all my drives and can activate then buy just adding or removing from the USB port hub. Each drive is directly assigned a hard drive letter which it keeps that assignment even if removed and then reconnected. So on my system all my drives have assigned letters. I used  [Computer Management] ->Storage->Disk Management  (center dual panels and bottom half where the drive graphs are I Right Click to use "Change Drive Letter and Paths" to set them as defaults on my system and yes I love the UNC and even divide my big drives into smaller UNC drives which really helps on some of my older stuff.
« Last Edit: March 11, 2025, 02:04:48 pm by What I can do »

 

TinyPortal © 2005-2018