|Delphi Clinic||C++Builder Gate||Training & Consultancy||Delphi Notes Weblog||Dr.Bob's Webshop|
This article was updated to include information regarding the WinHlp32.exe for Windows Vista
Delphi on Windows Vista
MSDN Subscribers can already download and install it (I've put Vista Business on my laptop, which is now a quattro-boot machine featuring Windows 2000, Windows XP, Windows 2003 Server and now also Windows Vista "Business").
Unlike Windows XP and Windows 2003, which visually mainly differ from Windows 2000 by using the Themes service (which is disabled by default on Windows 2003), Windows Vista has a significant changed user interface appearance. I write appearance, since the actual content is roughly the same. It's not as if there's a whole new world: it didn't take me long to find the right and familiar places (although enough details and features have changed to spend some more time learning and writing about).
One important new feature of Windows Vista is the so-called User Account Control (UAC) which is a security feature that will guard what certain applications are allowed to do on your machine. Applications should best be executed with the least possible privilege level (and seldom as Administrator for example), to avoid or limit the harm it can do. With the UAC, all users are just standard users (with no Administrator rights), with the ability to allow applications to get more (temporary) privileges when needed.
The UAC helps against viruses and spyware, but is also sometimes a bit of a nuisance when it comes to applications that can be trusted. Writing in the Program Files directory for example, is not allowed (by default), as we will see when running Delphi on Vista.
Since I mainly use Delphi 7 (for Win32) and Delphi 2006 (for both Win32 and .NET applications), I have started the process of installing and using these versions of Delphi on the final version of Windows Vista to examine the compatibility of Delphi as well as Delphi Win32 (and .NET) applications running on Windows Vista. This program is great whether you are studying for your online degrees tests or running your own business.
The following will apply to all version of Delphi up to version 7, as well as all versions of C++Builder up to version 6. For Delphi/C++Builder 2006, see the second part of this article.
When trying to install Delphi 7 on Windows Vista, we get an error message, claiming that "this program has known compatibility issues".
You can check for solutions online, but that won't help much. For now, just click on "Run program" to run the Delphi Installer anyway.
Using the Delphi Installer, you can install Delphi 7 (as well as other applications like InterBase). You won't get any problems during the installation.
I had a little problem connecting to the registration / license manager, but hopefully that will be solved quickly (I still have 30 days).
When starting the installed version of Delphi 7, I got the error message from Figure 1 again. This time, when clicking on the "Run program" button, Delphi would start, but with an error message telling us that Delphi is unable to (i.e. not allowed to) rename delphi32.$$$ to delphi32.dro.
And after clicking on OK, Delphi would open, but without an open project.
Since I always start Delphi 7 with the -np flag, I didn't even notice the different.
However, starting a new project also results in the above error message: being unable to rename the Delphi32.$$$ file to Dephi32.dro.
The reason clearly is that the Delphi32.exe application is not allowed (by Windows Vista) to write in the Delphi7\Bin directory.
To solve this, we need to allow the users of the laptop to "modify" the contents of this directory, as shown in the next screenshot:
Apart from the Delphi7\Bin directory, we must also allow the users of the laptop to "modify" the contents of the Delphi7\Projects directory so compiled applications (and packages) can be produced.
Note that any other directory you need to write to (like unit output directories) must also be opened up before you can actually compile and run the Delphi 7 applications.
The screenshot belows shows Delphi 7 running with a new VCL application open.
Compiling and running Delphi 7 applications also works fine after the aforementioned two changes. And now that Delphi 7 is up-and-running, I can "migrate" some Win32 applications to Windows Vista, making use of the new UI features. The only remaining issue is the integrated help, using WinHelp, which no longer works on Windows Vista.
According to KB917607, starting with Windows Vista, the Windows Help program will not ship as a component of Windows.
Also, third-party programs that include .hlp files are prohibited from redistributing the Windows Help program together with their products!
Users who want to view 32-bit .hlp files must download the program from the Microsoft Download Center, and then install it on their computers. Unfortunately, the download for Windows Help is "still in development", but will (hopefully) be available in time for the consumer release of Windows Vista (early 2007). Update: Microsoft finally released the Windows Help program (WinHlp32.exe) for Windows Vista. WinHlp32.exe is required to display 32-bit Help files that have the ".hlp" file name extension (including Delphi 7 helpfiles for example).
You can now download Windows6.0-KB917607-x86.msu as well as Windows6.0-KB917607-x64.msu (WinHlp32.exe for a 64-bit machine???).
Apart from installing and using Delphi 7 on Windows Vista, I also wanted to use Delphi 2006 - the latest release of Delphi (at the time of writing). Note that Delphi 2006 supports Win32 as well as .NET 1.1, and actually requires the .NET Framework version 1.1,
The Delphi 2006 installation CD starts with the installer offering the following choices:
Installing Borland Developer Studio 2006 (aka Delphi 2006) on Windows Vista triggers the BDS Bootstrap Utiliy, which will find a lot of missing things...
First of all, Windows Vista includes the .NET Framework 2.0 and 3.0, but doesn't come with the .NET Framework version 1.1. And since the Delphi 2006 IDE needs the .NET Framework 1.1, we need to install it:
After the .NET Framework 1.1, we are asked if we want to install the Service Pack #1 for the .NET Framework 1.1.
If you clicked on the "Yes" button in the above dialog, however, the result is not the installation of the .NET Framework 1.1 Service Pack #1, but rather the following dialog, telling us that KB867460 was invoked incorrectly.
Curiously enough, if you just close the above dialog, the installtion of Delphi 2006 will continue as if nothing bad has happened.
It appears that the .NET 1.1 Service Pack 1 isn't correctly invoked on Windows Vista, so we have to manually do that by running NDP1.1sp1-KB867460-X86.exe from the dotnetRedist directory on the Delphi 2006 CD.
Note that after the .NET 1.1 SP1 is installed, we get a message that we have to reboot the machine. And after the reboot, you'll get another message telling you that a startup application was blocked. This turned out to be netfxsetup.exe which you can allow by using the icon in the system tray.
Then, the actual installation of Delphi 2006 will start, and continue without further problems.
Finally, when Delphi 2006 is installed, we can start it.
This will result in an error message, related to the first error message we encountered when starting Delphi 7 (although the Delphi 7 error message was a bit clearer in my view).
The actual error line is the "Access is denied." message:
The error is shown for all .NET specific personalities. C# (above), Delphidotnet (below) as well as vb (below Delphi for .NET):
The errors are related to the User Account Control (UAC) that I mentioned earlier, and especially the fact that the BDS IDE is not allowed to write to the Borland\BDS\4.0\Bin subdirectory in the Program Files directory.
The easiest workaround that I found for this issue, was to "open" up the Bor-land\BDS\4.0\Bin directory to all users, and allow them to write in there. An alternative might be to give the BDS application these rights (which feels a bit safer). I'm not sure yet what the best solution is, but at least adding the "Modify" permission to the Borland\BDS\4.0\Bin directory works for me:
You may want to add similar permissions to the Borland\BDS\4.0\Demos directory, especially if you want to open the demo applications and compile them in their original location.
The alternative of course is to copy the relevant demo to a location in your local user profile, and open the project from there.
When Delphi 2006 is installed, we should also install Update #2 (and the Hot Fixes in the so-called HotFix Rollup). When you try to run the Update 2 msp file, however, it will complain that is it for the wrong version of Borland Developer Studio (which is nonsense, but is caused by the fact that it cannot find the installation database).
We have to manually start the installation of Update #2, by using a command prompt to go to the directory where the Update #2 msp file is located. Note that a "Run as Administrator" command prompt is needed. The actual command line is as follows:
msiexec /update bds2006_en_arch_upd2.mspNote that the "en" and "arch" parts here may be different for your specific version of Delphi 2006. This will run the Update #2 installer, after which you can also apply the HotFix Rollup, which like Update #2 is available for all registered Delphi 2006 users.
Update: On some Windows Vista machines, it's enough to run the bds2006_en_arch_upd2.msp with the "Run as Administrator" mode, and msiexec will take care of the rest.
The HotFix Rollup is an single executable that will not give any further compatibility problems when applying (just like the HotFix Rollup #2).
Although Windows Vista was released after Delphi 2006, it's good to know that it's not a real problem trying to install and run Delphi 2006 on Windows Vista. You have to play by the new rules when writing applications for Windows Vista, but that's another story for another day.
A final nice pre-Vista touch can be observed when looking at the Delphi 2006 About Box, which isn't able to recognize Windows Vista, and just reports Windows 2000 (Build 6000) as operating system: