SprinklerHead
14th April 2003 15:11 UTC
Path Manipulation thinger
This is in reference to the path manipulation functions here: http://nsis.sourceforge.net/archive/....php?pageid=91
Why was WriteRegStr used in these functions instead of WriteRegExpandStr? Probably not a big deal, but just thought I'd ask. I thought that WriteRegExpandStr might be better because it is supposed to handle the % character (like %WINDOWS% or something like that).
Just wondering. Handy functions though.
kichik
14th April 2003 17:53 UTC
It's REG_SZ here, that's why.
SprinklerHead
14th April 2003 19:12 UTC
Right, but I thought it should be REG_EXPAND_SZ like the HKLM path. Picking a nit I know but anyhow. Thanks guys.
kichik
15th April 2003 07:48 UTC
Is it REG_EXPAND_SZ on your computer? Maybe I have turned it into REG_SZ with some of my pre-tests.
Sunjammer
15th April 2003 09:38 UTC
It's REG_SZ on mine (Windows 2000).
SprinklerHead
15th April 2003 13:03 UTC
Sunjammer, are you looking at your Path variable in HKCU\Environment or in HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment? If you are looking at HKCU\Environment then it would probably be REG_SZ because you might have used the NSIS path manipulation functions.
I checked the machines around my desk here (3 Win2000, 1 WinXP) and all of them have the Path variable in HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment as a REG_EXPAND_SZ, which makes sense because I remember reading somewhere that if the Path string contains %SystemRoot% it needs to be a REG_EXPAND_SZ.