Delphi 7 and Windows 7
As you can see in this blog, I recently started programming again in Pascal, eh, Delphi Object Pascal. The version I use (since it is the last version close to traditional Windows programming) is version 7. The best version to use is the version that floats around as Delphi 7.2 Second Edition (search a torrent site) which is a trimmed and bugfixed small package.
Of course this package runs fine on Windows XP. But how on Windows 7?
This is how I got it to work.
Installation
- Make sure you run this as administrator, you will need the privs.
- Run the Delphi installer. Use defaults for the file locations, ignore the incompability warnings.
- Dont start Delphi 7 as it will complain when starting a project about unable to rename delphi32.$$$ to .dro in the /program files/delphi directories . And something about debug options requiring a change.
So there are access problems, as to be expected. Windows 7 is a lot more robust, so directories are better protected.
Solve the access problems
- Run this as administrator.
- Open the properties on c:/program files/delphixxx directory.
- On the first tab Clear the Read-only attribute and press Apply for all files including subdirectory.
- Open the security tab
- Give users (and admins if necessary) full access to c:/program files/delphixxx directory
Now Delphi can be used to write programs again.
Fix Winhelp
Help does not function, a windows pops up telling “winhelp is not supported anymore on this Windows version, go to microsoft.com for a fix” .
The fix for Vista is already made, the Windows 7 fix will be here Real Soon Now.
Edit january 2010: Search ‘ Windows Help program (WinHlp32.exe) for Windows 7′ on microsoft.com, currently here , install that and you do not need the next trick.
So this will be fixed in the future, but for now it can be solved as follows.
- Remove the Read-only attribute from winhlp32.exe and winhelp32.exe in c:/windows
- Set ownership of the winhlp32.exe file (properties, security tap, advanced) to administrators (and remember, you are logged on as admin!)
- change the security to full control
- rename winhlp32.exe to something like winhlp32old.exe just in case
- copy from a Windows XP system the files winhlp32.exe and winhelp.exe in c:\windows
Now help functions also.


Perfect fix - thanks very much!!!!
Hi writer.
i was just looking for this problem of windows 7 and delphi 7.
Now solved. Thanks a lot.
from Bayan Ulgii / Mongolia.
Thanks for the great resource!
To get WinHelp working on Windows 7, just install the MS Update here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=258aa5ec-e3d9-4228-8844-008e02b32a2c&displaylang=en&Hash=bc0nbVsZtNC%2fmhn01kruqtQFvzTcZdJbiAv3sSo%2f3mMWvi745uR0cMVQ8NwBr4pqCp9P2irmOyAGcEh1cL333w%3d%3d#filelist
Worked for me!
Saved me a lot of time. Thanks for the tip.
fine good solution
Thanks for sharing! My Delphi7 is now working!
Big help!
i have problem with delphi 7 . when i am trying to open or save any file , or project my delphi exe is closed without any error. so i am not able to do anything .
Thanks in advance
The default location for projects is in the program files/delphi directory. It seems you did not get the right permissions to write there.
Try to give read access for users to the program files AND all directories underneath and read/write to the delphi directory.
Its a bad idea btw to keep data in program files, so I would suggest an alternative working directory for your project anyway.
Thanks a lot! I use Delphi regularly and have just upgraded to Windows 7 and was initially gutted when I couldnt use Delphi 7.
Many thanks!
Thanks for the tutorial, my Delphi 7 now works again :). I also have the help working without replacing any files (just installed KB917607-x64 which is WinHlp32 from MS website).
One thing that is still bugging me is opening the last project at startup. It worked on XP, but on 7 it always opens with a new project instead of the last one. Luckily, it keeps the history for opening button correctly, so it’s not a big problem. Is there anything I can do about it?
Thanks for reporting the success. Looks like still a security issue, Delphi not remembering last project.
The help file fix appeared after I wrote the orginal blog, I did edit in the now available help file KB article for X86.
Since you mention -x64 I assume Delphi works on Windows 7 64 bit?
Oh, I’m sorry, it was my mistake - I forgot to select “Auto-save project desktop” (it has been long time since I installed D7 for the last time, and I simply forgot what that option did) :).
Yes, for the most part it works on W7 64-bit (compiling, running and debugging 32-bit applications). There are some issues, but not essential, they are:
- occasional IDE crash (happened only two times to me: first right at the running (it was before I have set up directory permissions and WinXP compatibility mode), and second time was after I tried opening about 10 projects one after another, so it is probably not going to occur frequently,
- in one of my projects (and only one) it displays “[Error] RLINK32: Error opening file “ConvTbl.dfm”" during the first run, but I just press Run again and it works perfectly from now on.
That’s it. I have tried debugging (not thoroughly however) and haven’t noticed any g-glitches.
thanks for the tips..
so, I can solve my sister problem with Delphi..