delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/05/16/07:02:25

X-Spam-Check-By: sourceware.org
Message-ID: <4469B126.E2E1335A@dessent.net>
Date: Tue, 16 May 2006 04:01:58 -0700
From: Brian Dessent <brian AT dessent DOT net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: telnet: tcp/telnet: unknown service
References: <20060516085530 DOT 91248 DOT qmail AT web25804 DOT mail DOT ukl DOT yahoo DOT com>
X-IsSubscribed: yes
Reply-To: cygwin AT cygwin DOT com
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com

Jose Luis Fernandez wrote:

> After doing a lot more googleing, I've stumbled upon
> this fix.  Wonder
> if you know about this issue?
> 
> In regedit go to
> HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters
> edit DataBasePath change %SystemRoot% to its real
> value (on mine its
> C:\WINDOWS)  Don't know why but this fixed my issue.

Well, that may work but it's suboptimal.  The real fix is to ensure that
the environment variable SYSTEMROOT is always set, which is normally
done by Windows without the user having to do anything.  Unsetting this
may cause any number of things to break, and this may only be one of
them -- even if your particular telnet problem is solved you need to
make sure that SYSTEMROOT isn't being unset somewhere.

You see this happen sometimes when an app spawns a child process (such
as CGI) and tries to be clever about clearing its environment of
unnecessary things.  If SYSTEMROOT is one of them, random thing start
breaking.  There is code in Cygwin to try to prevent this from ever
happening, but this obviously is of no use to non-Cygwin programs or
programs that go behind Cygwin's back (such as by calling the win32 API
directly.)

Another version of this problem crops up if some program (perhaps a
brain-dead installer) changes this particular registry key from a
REG_EXPAND_SZ to a standard string (REG_SZ) type, in which case the
environment variable will not be expanded.  It must be type
REG_EXPAND_SZ.

Brian

--
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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019