delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/11/06/20:32:02

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Message-ID: <3DC9C265.5030804@pobox.com>
Date: Thu, 07 Nov 2002 12:31:17 +1100
From: Chris Walters <chris DOT walters AT pobox DOT com>
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.1) Gecko/20020826
X-Accept-Language: en-us, en
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: CYGWIN Installer should setup a root environment variable
References: <Pine DOT GSO DOT 4 DOT 44 DOT 0211060108050 DOT 24745-100000 AT slinky DOT cs DOT nyu DOT edu>

Igor Pechtchanski wrote:
> On Wed, 6 Nov 2002, Chris Walters wrote:
>> I have experienced many times situations which I would like to refer to
>> CYGWIN's root directory from a bat script. The most generic solution
>> would be to utilise an environment variable such as CYGROOT or (as in
>> startxwin.bat) CYGWIN_ROOT to refer to the absolute windows pathname
>> (e.g. D:\cygwin). This would free us from making assumptions if it was
>> setup during the installation utility. The environment variable should
>> be setup for system if installed for "All Users".
> 
> `cygpath -w /`

This is fine, but how do I use the result in a DOS bat script? I can't 
find any way to execute this command and store the result into an 
envrionment variable or use it to use it in the arguments for a separate 
command.

-- 
Chris Walters
+-------------------------------------------------------+
|  ,-_|\   Chris Walters      <chris DOT walters AT pobox DOT com> |
| /     \                                               |
| \_,-._/                                               |
|      v                                                |
+-------------------------------------------------------+


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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