Mail Archives: cygwin/2004/11/30/19:36:30
On 26 Nov, Igor Pechtchanski wrote:
> On Fri, 26 Nov 2004, Luke Kendall wrote:
>
> > I see that by default PATH includes some entries like
> > %SystemRoot%/System32
> >
> > I also note that $SystemRoot is undefined, yet $SYSTEMROOT contains the
> > expected C:\WINDOWS value.
> >
> > This of course causes problems. Would a backslash-style path work
> > correctly if it were properly interpolated into the PATH? Is the %
> > notation special magic for Cygwin to handle DOS-isms?
> >
> > The case variance may be of interest, in that case.
>
> The case variance is a red herring.
Could you explain some more? I was thinking that if SystemRoot but
SYSTEMROOT was, it might be relevant.
> Also, Cygwin doesn't understand the
> %...% notation.
Sure, of course.
> OTOH, you're not supposed to be seeing these entries in
> the actual value of your PATH, either in Windows or in Cygwin. Such
> entries are usually caused by the wrong type assigned to the PATH value in
> the registry (REG_SZ instead of REG_EXPAND_SZ). Some buggy installers
> change the type of the PATH registry entry.
Ah! So at some point in the machine's history, some buggy installer
altered this, and it has knock-on effects like this.
> You need to change it back,
> so that strings like %SystemRoot% will be automatically expanded by
> Windows before Cygwin ever sees them.
> HTH,
> Igor
I couldn't find an entry for PATH that seemed to be the normal
environment variable - only things buried inside other items like CLSID
that seemed to be used for other things.
In the Control Panel I found that the system environment variable for
PATH was defined to use %SystemRoot%, so I suspect that's where it's
coming from. And you're right, it's set badly for Windows and Cygwin,
and interfering with all shells:
C:\>echo %PATH%
%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem
C:>net use
'net' is not recognized as an internal or external command,
operable program or batch file.
Thanks, Igor
luke
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -