Re: Enviroment variables not being resolved

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi David,

That's exactly what was going on. I verified the registry values types
in HKLM\..\Environment and "Path" was already REG_EXPAND_SZ but the "Nant"
wasn't (also som other values are not). All values however was created by
the "System Properties" GUI. Anyway I deleted it and re-create it manually
with the correct type, but it didn't solve the problem. What is ackward is
that if I update the enviroment variables trough the properties GUI (no need
to change any value, just enter in the "edit" window and then click ok) the
enviroment variables expand ok. But after a logoff/logon thet are once again
"unexpanded".
Regarding the values in HKCU\Environment all values are of Reg_Expand_Sz
but there is only two values named TEMP and TMP, no Path.

Below is a "resume" of the tests I made in other to clarify. Any hints?

Cheers,

echo %path%
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\Microsoft SQL Server\80\Tools\BINN;%nant%

echo %nant%
C:\Progra~1\NAnt-Gui\bin

<<changed nant value type to EXPAND_SZ>>
echo %path%
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\Microsoft SQL Server\80\Tools\BINN;%nant%

<<update enviroment variables trought GUI>>
echo %path%
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\NAnt-Gui\bin

<<logoff/logon>>
echo %path%
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program
Files\Microsoft SQL Server\80\Tools\BINN;%nant%

"Dave Patrick" <DSPatrick@xxxxxxxxxxxxxxxx> wrote in message
news:ueCkXff3GHA.1040@xxxxxxxxxxxxxxxxxxxxxxx
So are you saying if you;

echo %path%

that the semi-colon separated values are partially expanded?


Also check that "Path" found at;

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment

HKCU\Environment

are both a type Reg_Expand_Sz string and not type Reg_Sz

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

"Eric Chaves" wrote:
| Hi folks,
|
| I'm facing a strange behavior with both our Windows 2003 Servers and
| some Windows XP regarding the use o enviroment variables. The default
value
| for %PATH% system variable has several references for %systemroot% that
| expand normally. After adding appending new item to end of the %PATH%
system
| variable trough the GUI ("My Computer->Properties->Advanced->Enviroment
| Variables"), the %systemroot% nor more expand properly, and thus any
command
| that I try to run like IPCONFIG, PING and so on are no longer located.
If
I
| add a new system variable for the new item (ie.: %NANT%) and then append
| this variable instead of the path, the %systemroot% expands normally but
the
| %NANT% don't!!
| I have tried all sort of procedure to set this variable: I done it
using
| the local console, remote console (terminal services), remote console
| connected to console. I try to reboot after changing the enviroment
| variables and still having this problem.
|
| Does any one have the some problem? What is going wrong here, any
ideas?
|
| Cheers,
|
| Eric
|
|




.



Relevant Pages