Avatar of Ron de Weijze
Ron de WeijzeFlag for Netherlands asked on

How can Delphi 7 be converted to Delphi 10.4?

Hi, my question is about convertimg Delphi 7 to Delphi 10.4. I have asked the experts, but I do not seem to get an answer. The problem is, that while compiling the Main program, there is one error, and nothing gets compiled. The error is in the code, which starts with C:\, and not C:\xxxxx and the error message is "[MakeDir Error] Unable to create directory "C:\Documents and Settings\Gebruiker\Mijn documenten\Programmeren\environment\". Access to the path 'C:\Documents and Settings\Gebruiker\Mijn documenten\Programmeren\environment\' is denied." I have asked lenamtl and Bembi and David Johnson, CD but there was no answer. I must admit, I am not a programmer, however I have the program developed by a nimber of programmers in the 90s and it worked, so I have tried to sell it. However, since there was a problem in it (I think I know what it was, for I did some programming myself) and now I am ready to sell it again. Therefore I purchased from Embarcadero and from Experts exchange, however so far without results.

Programming* Delphi 7Delphi

Avatar of undefined
Last Comment
Ron de Weijze

8/22/2022 - Mon
Sinisa Vuk

Check if there is a reference to c:\... somewhere in units harcoded. But possible problem is wrong output directory in Project/Options/Building/Delphi Compiler. Check for Output directory for all configuration types (Win, Android,...) and empty field if found something like you note.
Tomas Helgi Johannsson

Hi,

Have you tried to create another folder in different path? That is, not the 
C:\Documents and Settings\Gebruiker\Mijn documenten\Programmeren\environment\
Note that the "Documents and Settings" folder an old Windows file structure and is no longer available in Windows 10. And the access denied error is probably a "folder not found" error.
Policies on your computer might also prevent you from creating folders on the root C:.

Regards,
    Tomas Helgi
ASKER
Ron de Weijze

>>>I wonder: isn't this an upward compatibility issue, that should be solved by Delphi?<<<

Thank you Sinisa and thank you Tomas.

Sinisa Vuk "Check if there is a reference to c:\... somewhere in units harcoded."

Here is c:\
swapfile.sys16.0 MB13-08-2021 03:56:21
pagefile.sys6.5 GB13-08-2021 03:56:21
hp/03-10-2020 11:53:03
hiberfil.sys1.5 GB13-08-2021 03:56:18
Windows/13-08-2021 03:55:45
Users/23-02-2021 17:13:16
System.sav/03-10-2020 22:22:06
System Volume Information/28-08-2021 05:01:52
Recovery/03-10-2020 22:21:44
Programmeren/15-07-2021 19:01:02
ProgramData/18-08-2021 23:30:22
Program Files/05-09-2021 22:03:59
Program Files (x86)/23-05-2021 15:01:31
PerfLogs/07-12-2019 10:14:52
OneDriveTemp/23-02-2021 16:57:50
Intel/13-08-2021 03:56:22
DumpStack.log.tmp8.0 kB13-08-2021 03:56:21
Documents and Settings/03-10-2020 12:20:49
Components/23-05-2021 14:58:29
$WinREAgent/13-08-2021 03:37:41
$Recycle.Bin/24-02-2021 00:53:02

Sorry, I do not know where to look or what to look out for... (you know, I am not a programmer).

lenamtl  "What I would do is to check if file and directory exists
(as the directory may not exist or may exist, as the file may exist or not in this directory)
if they do not exists = create
if they already exists (you can rename your new file / dir )
I'm using date and time epoch https://www.epochconverter.com/ with the name (this ensure unique name)
for example mybackup become mybackup_1617199859
1617199859  = March 31, 2021 2:10:59" 

Tomas Helgi Johannsson "Have you tried to create another folder in different path? That is, not the "C:\Documents and Settings\Gebruiker\Mijn documenten\Programmeren\environment\  Note that the "Documents and Settings" folder an old Windows file structure and is no longer available in Windows 10. And the access denied error is probably a "folder not found" error. Policies on your computer might also prevent you from creating folders on the root C:.

To both of you:
I have not tried another folder in a different path. I will try that tomorrow.
"Documents and Settings" is available.

Your help has saved me hundreds of hours of internet surfing.
fblack61
Sinisa Vuk

You do it wrong. When you are in Delphi with loaded project..... before compile....
1. go to menu Project
2. then find Options...
3. on forms which pops up - find Building (left tree) - expand if needed
4. click on Delphi Compiled under Building
5. on right panel you'll need to find and check for output folders (DCP output..., Output ...., ....)
6. If there are set your exact folder (... Document and...) - delete contents of edit(s)
7. save and close form.
8. compile ... youe exe should be find somewhere in project folder now - not in custom user folder....
ASKER
Ron de Weijze

Sinisa,

Thank you VERY much for your detailed instructions. I cannot find "find Building (left tree) - expand if needed"...


Sinisa Vuk

Building? - first item from tree....
Now... select Delphi Compiler item...  and clear fields.....


Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
ASKER
Ron de Weijze

All the items in "Delphi Compiler" have clear fields (are all false).

I went to
4. click on Delphi Compiled under Building
5. on right panel you'll need to find and check for output folders (DCP output..., Output ...., ....) 
I understand that this must be the "Show Project Output" like below: