So I felt the urge to toy around with Windows on a quick-and-dirty base. And there's no platform more quick and dirty than Borland Delphi: It offers access to full Windows API, offers a decent visual form editor and it doesn't throw you into a dependency hell -- only drawback, you'll have to live with ObjectPascal (which admittedly is not as bad as it could be). Only problem: I needed to install it on a Windows 7. That's when the fun starts. As a bonus, this article also covers Delphi 6. Know one of them, know them all.

There it is -- the cover of the Delphi version with which I made my first steps into the fabulous world of Windows programming in the summer of 1999. Bought at a small bookstore in Flensburg, it contains not only a copy of Delphi 4 but also one of the older 16-Bit Delphi 1.6 -- which I preferred. I have no idea why, but my first Windows programs were 16-Bit binaries. Maybe it was the availability of setSysModalWindow() -- which back then on Windows 9x was still implemented as set system modal window (and not as setForegroundWindow()). Oh well.

Back in nowtime. Borland Delphi 1.6 cannot be executed on Windows 7 since support for 16-Bit executeables has been dropped; so Delphi 4 is on.

I won't bore you with "the 99 ways it didn't work" and restrict this to "how it worked".

Preparation

Installation requires a set of privileges. That is, administrative privileges on the local machine, including the ability to write files to the installation directory. At this point, you may want to keep in mind that Delphi will by default start with an empty project in its installation directory. What 1999 was kinda "state of the art" is nowerdays a no-go. Windows executeables installed into the default program folder aren't expected to write to it. Thus you may want to install Delphi somewhere else. My personal choice in such cases: C:\bin\. Then keep in mind that the installation used to be run from a CD -- thus it may rely on the installation folder being assigned a drive letter.

So the installation setup parameters are:

The little dirty part

I do like networks and so the installation files ended up on a network share. Primary reason: My target system has no CD/DVD drive, so I used some CIFS share. From which I copied them onto the local harddisk, say to C:\bin\install\bd4. Then I needed to have administrative privileges when executing the installer -- and all binaries probably called by it. And that's the point at which thinking just exceeds the magic coming with Windows compatibility. I tried installations with all kinds of compatibility settings -- they mostly failed at some point. Thus I finally did the following: Now you do have a real root shell and all commands executed from this command shell will be running with adminstrative privileges. Yes that's dangerous, so do not type silly things. What most forget is that this shell does not have the user's environment -- especially in terms of network drives and privileges. Thus, we need to build our home for the following installation. And this is when it comes in handy to know some commands from the good old DOS times. For this is what we're gonna do: Map a drive letter to C:\bin\install\bd4 by means of
C:\path> subst I: C:\bin\install\bd4
After this command is issued sucessfully, we can jump there and just type install.exe, hit return and feel a bit of the gorgeous spirit of late 1998 when InstallShield was the hot shit, .msi files were far away and the dot-com-bubble was yet to come.
Once you are confronted with the license agreement as shown below, there drive mapping has proven to be working -- that license is loaded from a seperate file into the installer. In case the loading fails, you'd be confronted with an empty text box.
And finally...

The good news

This procedure works just the same way if you want to install Borland Delphi 6 on Windows 7.

Stichworte:


Impressum