every time I click run on my delphi project it says couldn't find .exe but everything is already coded [duplicate] - delphi

I have installed Delphi 2010 and tried to create a new project clearly.
but when i compile my project, delphi does not generate any exe file.
also when i try to run application i get this error:
Could not find program, "C:\test\Project1.exe"
note: i haven't changed any configuration or settings of Delphi or project.
everything is as it's default

It was about getting absolute path because i'd changed ProgramFilesPath and ProgramFilesDir in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion to D: without leading backslash.
I changed it to D:\ and the problem was solved now
thank you all

If you're on Vista or later, this could be because of UAC settings. Try setting the project output folder in Project->Options to something a limited account would have access to, such as somewhere under My Documents\RAD Studio\Projects.

I've had the same problem on Windows 7.
Installing it as administrator solved the problem IIRC.
If that doesn't work then make sure you run it as administrator.
You are running it on XP though, so unless you've installed it as a non-administrator, or run it as a non-administrator this shouldn't be happening.
Note that if you're in a domain, it's possible that you're not local admin on your XP machine.

Run Process Explorer, search for any open handles to C:\test\Project1.exe using Find, Find handle or dll.
That will tell you what is locking your .exe.
Edit 20221221 because of link rot:
[Wayback/Archive] Process Explorer redirects to [Wayback/Archive] Process Explorer - Sysinternals | Microsoft Learn
[Wayback/Archive] Know which process has locked a file has died and moved to[Wayback/Archive] How to Identify the Process that has Locked a File in Windows and added solutions based on resmon.exe (built-in), handle.exe (SysInternals), OpenFiles.exe (built-in, but requires a global flag to be enabled which for enabling requires a reboot).
[Wayback/Archive] Handle - Sysinternals | Microsoft Learn

Related

running delphi application on non delphi pc

I'm building an application using delphi 7 with ms access 2007 as the database for a client. it runs normally on my laptop (asus) but after I copy the whole project folder and run the Project.exe, it gives me an error "Disk write error".
I've tried googling about "disk write error delphi application" but only found about I/O errors. my application only opens a file after a button click in a form that is called when I click on a submenu, so I'm guessing it's not about I/O..
what is the solution?
thanks in advance
P.S.:
in the project options, the checkbox for building application using runtime packages is already unchecked.
my PC and my client's PC are both using windows 7 32bit (I haven't actually confirmed this with him but I'm guessing he's also using 32bit version because he's not a techy guy)
his PC doesn't have delphi installed
UPDATE :
I forgot that the exact error message was "Disk or network error" instead of "Disk write error".
after googling for the correct error message, I've found out that the problem is that I use a full path for the DataSource in the ADOs' connection string. after I change connection string into "DataSource=.\db\my_db.mdb", the application works perfectly.
even though this question has a negative mark, I'll just leave this solution here in case someone needs it in the future...
Here are some different questions.
The "Disk write error" probably is that you need permissions to write in the folder. A simple test is that you execute your application with "admin permissions" to test this.
Different question is the "using runtime packages" check in project options.
If you compile your application with this check, you need to copy the BPL's needed for your application with the executable.
If you compile with this option unchecked, your exe file include all the libraries for execute (not included DLL's or external dependencies).

CGI application misbehaved by not returning a complete set of HTTP headers

Hi someone created one application "ReqServ" using Code gear Delphi 2009 and C++ Builder 2009. This application returns chart images. This application is called through URL like "http:/ /machine_name/MONITOR/ReqServ.exe". Previously this application was working good and displays the charts in Internet Explorer.
But someone uninstalled the Code gear RAD application and other installed application from that machine.
Now when I am trying to access that URL its displying me "CGI application misbehaved by not returning a complete set of HTTP headers".
I searched on the internet and I found below link:
"http://edn.embarcadero.com/article/21574"
which tells that this error might be due to run time packages.
I opened the project(.bpr extenstion) in C++ Builder 2009 and found that "Build With Runtime packages" is checked.
Is there any way that without installing RAD 2009 or any other applcation I can make this "RegServ" run. I have backup of Code Gear folder from program Files. But I am confused where I can place these files now.
Or is there any other way to resolve this error? Thaks for help.
Are you able to run the exe file from a command prompt on the server? If so you should see the exact error that is returned (and in fact will make an incomplete set of HTTP headers).
If it says which file(s) it is missing, search them in the Program Files backup, and copy them to the %WINDIR%\SYSTEM32 folder. If it doesn't, it'll probably be the *.bpl files of which the EDN article mentions a few.

Delphi does not generate any exe file

I have installed Delphi 2010 and tried to create a new project clearly.
but when i compile my project, delphi does not generate any exe file.
also when i try to run application i get this error:
Could not find program, "C:\test\Project1.exe"
note: i haven't changed any configuration or settings of Delphi or project.
everything is as it's default
It was about getting absolute path because i'd changed ProgramFilesPath and ProgramFilesDir in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion to D: without leading backslash.
I changed it to D:\ and the problem was solved now
thank you all
If you're on Vista or later, this could be because of UAC settings. Try setting the project output folder in Project->Options to something a limited account would have access to, such as somewhere under My Documents\RAD Studio\Projects.
I've had the same problem on Windows 7.
Installing it as administrator solved the problem IIRC.
If that doesn't work then make sure you run it as administrator.
You are running it on XP though, so unless you've installed it as a non-administrator, or run it as a non-administrator this shouldn't be happening.
Note that if you're in a domain, it's possible that you're not local admin on your XP machine.
Run Process Explorer, search for any open handles to C:\test\Project1.exe using Find, Find handle or dll.
That will tell you what is locking your .exe.
Edit 20221221 because of link rot:
[Wayback/Archive] Process Explorer redirects to [Wayback/Archive] Process Explorer - Sysinternals | Microsoft Learn
[Wayback/Archive] Know which process has locked a file has died and moved to[Wayback/Archive] How to Identify the Process that has Locked a File in Windows and added solutions based on resmon.exe (built-in), handle.exe (SysInternals), OpenFiles.exe (built-in, but requires a global flag to be enabled which for enabling requires a reboot).
[Wayback/Archive] Handle - Sysinternals | Microsoft Learn

Delphi XE - F1027 Unit not found: 'System.pas' or binary equivalents (.dcu) upon Activation of trial version

I just purchased the full version of Delphi XE Architect after using the trial version for 30 days. I can't build anything, every time I go to build a project I get the error.
[DCC Fatal Error] MegaMainPrj.dpr(1): F1027 Unit not found: 'System.pas' or binary equivalents (.dcu)
A quick google said that the library paths were a problem and I compared what was given (in a previous stackoverflow question) with what I had in the registry, and it was identical.
What could be causing this?
EDIT: Immediatly after I get this error message the entire IDE crashes.
add this :
$(BDSLIB)\win32\release;
to your library path .
Make sure you have the environmental variables set properly (Tools->Options->Environmental Variables from the IDE's main menu):
BDS=D:\Embarcadero\RAD Studio\8.0
BDSCOMMONDIR=C:\Users\Public\Documents\RAD Studio\8.0
PLATFORM=Win32
These should all be set in the System Variables section, and should have been added by the installer. (Obviously, they should point to the installation location of your XE installation - mine is installed in D:\Embarcadero\RAD Studio\8.0, as you can see.)
EDIT: I see in your comment you installed in C:\Program Files - bad idea if you're running Windows Vista or Win7 or higher. You should try installing in a different location. You can also try running the IDE as Administrator (right-click shortcut in Start->All Programs->Embarcadero->RAD Studio XE->Delphi XE, choose "Run as Administrator" from context menu). Does this change anything?
Also, you can open a free support case at Embarcadero for installation-related issues. I'd first try reinstalling in another location (running the install as Administrator, putting it in another folder, and installing for all users); if that doesn't work, open a support case. You can also post to the Embarcadero Delphi Installation forums - you'll need to have already created a user account there first to log in.
C:\Embarcadero\RAD Studio\9.0\lib\win32\release
and
C:\Embarcadero\RAD Studio\9.0\lib\win32\debug
Both of these path have been to add in Delphi XE2 from IDE <<Tools->Options->Library->Library path>>
It's OK?
Goto Tools->Options->Library->Library path
and add $(BDSLIB)\win32\release
This worked in Delphi 10.2
When compiling using the command line compiler, so not from within the IDE, you can also get this error when the name of the build configuration is not "debug" and not "release".
It seems that, when using the command line compiler, it tries to find its dcus in a path under BDSLIB that it constructs using the configuration name.
I had this happening when using a configuration named ReleaseHA. Note: it was not a sub configuration under "release", but an extra configuration besides "debug" and "release".
Sometimes this error message occurs when we have duplicate libraries included.
Make sure that:
Tools->Options->Environmental Options->Library
and
Project->Options->Directories/Conditionals
Don't include the same paths...
Running as Administrator worked for me.

Delphi 2010 remote debugging - unable to get breakpoints working

I recently posted this question about my inability to get Delphi 2010 working with remote debugging. I have not had any success and decided to post up a simple step-by-step test technique that might highlight what I'm doing wrong. THIS IS REALLY IMPORTANT to me - I've used Delphi since V1.0 and earn my living from it. Being stuck like this is a pain and its keeping me on Delphi 7.
Anyway, here goes.
Ensure that Delphi 2010 has updates 4&5.
Fire up Delphi 2010, then File | New | VCL Forms App. Put a button on the form, put 'ShowMessage( 'hello' ) in the button OnClick event. Save the project and its unit in a local folder "C:\scratch". Build the project, run it, click the button, 'hello' appears, all fine.
On a networked PC (194.168.1.64), create a new folder "c:\DebugTest" and share it with R/W access.
On 194.168.1.64 install the Remote Debugger from the latest download on the Embarcadero Website (RemoteDebugger_upd2.exe). CLick rmtdbg140.exe to run. Accept the 'un-block' message from the firewall.
Edit the DEBUG build configuration compiler settings with Output directory=\192.168.1.64\DebugTest and unit output directory = c:\scratch - see
Edit the Linking settings to set Debug Information=True, Include remote debug symbols=True. See
Leave compiling settings at defaults. See
Do a full build. The relevant project exe 'project2.exe' and 'project2.rsm' appear in the remote folder \192.168.1.64\DebugTest. Blue dots are visible in Unit2 in the IDE.
Set a breakpoint on the 'ShowMessage' line (the button OnClick event).
Use 'Run' | 'Load Process' with Remote path=c:\DebugTest\Project2.exe, Remote Host=192.168.1.64 and Working directory=c:\DebugTest see
Click 'Load'. The visible breakpoint is immediately disabled, the project starts running and opens the CPU window and stops. Pressing f9 cause the exe to run fully on the remote machine, the button works, you just cannot debug it.
I've tried various 'obvious' things like firewall off but all to no avail. Could some kind person suggest further ideas?
Many thanks.
Well, for me the problem has now been solved, although as a 'work around' and after significant interaction with Embarcadero and an upgrade to XE (which also did not work).
It would appear that the remote debugger is flaky (or possibly just picky) in its ability to load rsm (remote symbols) files - they are still looking into why mine wont load. My rsm file is big at around 50Mb although this is no problem for Delphi 7's remote debugger.
The work around involved upgrading to Delphi XE and then choosing the compiler link option 'Place Debug Information in separate TDS file'. This seems to create a tds file onthe remote target instead of a rsm file and breakpoints then work fine.
I've submitted my rsm and tds files to Embarcadero for investigation as to why this happens.
What Windows OS? Maybe run rmtdbg140.exe as admin.
I run D2010 remote debugging on XP versus XP. My How-To is at http://blog.runbits.com/post/Remote-debugging-Delphi.aspx
I had this problem. Installing Update 4 for Delphi 2010 solved my problem. It is also listed in the list of fixed problems of Update 4.
It is imperative to have correct time zone and clock on remote system. In my case I set up remote debugging and when I load process the breakpoints turned green. I checked remote system timezone and clock, set it right and remote dubugger worked again.

Resources