Installer breaks Windows system path
Original Reporter info from Mantis: nickysn @nickysn
-
Reporter name: Nikolay Nikolov
Original Reporter info from Mantis: nickysn @nickysn
- Reporter name: Nikolay Nikolov
Description:
The Windows installer changes the type of the system Path environment variable in the registry from its default value of REG_EXPAND_SZ to REG_SZ, which breaks the automatic expansion of '%SystemRoot%' and similar variables, used in the path.
Steps to reproduce:
tested under 32-bit Windows XP Professional Service Pack 3:
- open regedit.exe and navigate to:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
and check that the type of the 'Path' is REG_EXPAND_SZ and that its value looks similar to:
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
The important bit is that it uses "%SystemRoot%", instead of absolute path. This is the default case in a standard Windows XP install.
- install FPC 2.4.2rc1 as admin via the fpc-2.4.2rc1.i386-win32.exe installer executable
- observe in regedit that the type of the 'Path' registry variable has changed to REG_SZ
- reboot
- open command prompt and type PATH to see the current path. Observe that Windows has not expanded %SystemRoot% to the real windows directory.
- try running some of the standard windows console applications/commands like xcopy and ping, and observe that they don't work, unless you enter the full path to your windows\system32 directory