delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2006/08/18/01:20:15

X-Spam-Check-By: sourceware.org
Date: Fri, 18 Aug 2006 01:19:59 -0400
From: Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Newbie: Setting environment variables from a .bat file
Message-ID: <20060818051959.GA801@trixie.casa.cgf.cx>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <ec3ejc$kqv$1 AT sea DOT gmane DOT org>
Mime-Version: 1.0
In-Reply-To: <ec3ejc$kqv$1@sea.gmane.org>
User-Agent: Mutt/1.5.11
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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

On Thu, Aug 17, 2006 at 11:10:20PM -0500, Neil Kolban wrote:
>Folks,
>I have some windows BAT files that set some windows CMD environment 
>variables.   I am hoping to run a shell under cygwin but when I run the BAT 
>files from a shell prompt, the BAT file set variables are not exported to 
>the parent shell.   Is there a way that I can have BAT file set variables 
>visible in the calling environment?

No.  Environment variables propagate "down" not "up".  You can't set an
environment variable in a child and see it in its parent, in Windows, Linux,
or Cygwin.

cgf

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