One of my systems has a broken Delphi installation: it thinks BDSCOMMONDIR
points to C:\\Windows\\system32\\9.0
whereas on a functioning system, it
I now had access to a system with Delphi 2007 showing similar symptoms for which I used RegAlyzer to verify.
By default, Delphi 2007 uses the SYSTEM
setting of the environment variable from the registry:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
It never gets the value from the USER
environment variable key in the registry:
HKEY_CURRENT_USER\Environment
An override is stored by Delphi 2007 (which is BDS version 5.0) under this key:
HKEY_CURRENT_USER\Software\Borland\BDS\5.0\Environment Variables
All three keys store regular REG_SZ name/value pairs (where name is BDSCOMMONDIR
).
My guess (I hope to eventually verify this) is that newer Delphi versions have similar behaviour because of backward compatibility.