View Issue Details

IDProjectCategoryView StatusLast Update
0017654FPCInstallerpublic2011-05-02 09:01
ReporterNikolay Nikolov Assigned ToMarco van de Voort  
Status closedResolutionfixed 
Product Version2.4.2 
Fixed in Version2.4.2 
Summary0017654: Installer breaks Windows system path
DescriptionThe 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 Reproducetested under 32-bit Windows XP Professional Service Pack 3:

1. 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:
The important bit is that it uses "%SystemRoot%", instead of absolute path. This is the default case in a standard Windows XP install.
2. install FPC 2.4.2rc1 as admin via the fpc-2.4.2rc1.i386-win32.exe installer executable
3. observe in regedit that the type of the 'Path' registry variable has changed to REG_SZ
4. reboot
5. open command prompt and type PATH to see the current path. Observe that Windows has not expanded %SystemRoot% to the real windows directory.
6. 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
TagsNo tags attached.
Fixed in Revisiontrunk: 799, fixes_2_4: 800
Attached Files


Nikolay Nikolov

2010-10-17 16:46

developer   ~0041881

hm, I wrote more details in the 'steps to reproduce' section of the bug report form, but I can't see it now, where has it gone?

Juha Manninen

2010-10-17 17:18

reporter   ~0041883

Nikolay: Click [ View Advanced ]

Nikolay Nikolov

2010-10-17 17:50

developer   ~0041884

thanks :)

Marco van de Voort

2010-10-19 19:30

manager   ~0041919

Should be expandsz in the script instead of string probably

Marco van de Voort

2010-10-23 11:18

manager   ~0042019

Tested with expand_sz and it indeed works. I only fixed it for HKLM not for HKCU since that seems to always be REG_SZ under XP.

Issue History

Date Modified Username Field Change
2010-10-17 16:44 Nikolay Nikolov New Issue
2010-10-17 16:44 Nikolay Nikolov FPCOldBugId => 0
2010-10-17 16:46 Nikolay Nikolov Note Added: 0041881
2010-10-17 17:18 Juha Manninen Note Added: 0041883
2010-10-17 17:50 Nikolay Nikolov Note Added: 0041884
2010-10-19 19:30 Marco van de Voort Note Added: 0041919
2010-10-23 11:18 Marco van de Voort Fixed in Revision => trunk: 799, fixes_2_4: 800
2010-10-23 11:18 Marco van de Voort Status new => resolved
2010-10-23 11:18 Marco van de Voort Fixed in Version => 2.4.2
2010-10-23 11:18 Marco van de Voort Resolution open => fixed
2010-10-23 11:18 Marco van de Voort Assigned To => Marco van de Voort
2010-10-23 11:18 Marco van de Voort Note Added: 0042019
2011-05-02 09:01 Marco van de Voort Status resolved => closed