delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/06/13/10:28:37

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
Date: Mon, 13 Jun 2005 16:28:24 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Directory c:\%USERPROFILE% created
Message-ID: <20050613142824.GA3522@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <ec453c77b57098b626e652d467d9617d AT kreisbote DOT de> <20050609081128 DOT GC19050 AT calimero DOT vinschen DOT de> <fb08b3fb12df8da74c1e0b3f247d5903 AT kreisbote DOT de>
Mime-Version: 1.0
In-Reply-To: <fb08b3fb12df8da74c1e0b3f247d5903@kreisbote.de>
User-Agent: Mutt/1.4.2i

On Jun 13 16:16, Oliver Geisen wrote:
> Hi,
> 
> >>i was wandering about strange folders created in the root directory of
> >>my Cygwin-Enhanced PCs and found out
> >>that everytime i start installer programs from within a cygwin shell, 
> >>a
> >>folder called %USERPROFILE% is created
> >>in the base directory of the pc's harddisk.
> >
> >Sure it's not something you're doing?  The variable is certainly
> >available when running the shell with cygwin.bat.  And even when
> >starting, say, tcsh directly from explorer, the variable is there,
> >right in the environment.
> 
> I tested this again. After starting a "local" bash (local means i start
> it via doubleclick from within windows) i can see a "USERPROFILE" 
> env.-var.
> 
> If i do this in an bash started remotely (via sshd) i can't see it 
> anymore.
> So i think this variable comes from Explorer of whatever and is not 
> initialized
> within a ssh-shell session.
> This is also reflected by "cygpath -D" which outputs 
> "/cygdrive/c/%USERPROFILE%/Desktop".
> 
> I found no trace where this var is set, so please give me a hint.

It's set inside of Cygwin if possible.  It opens the registry and
tries to read the following key:

  HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\$USERNAME\ProfileImagePath

If it's available, it's used as $USERPROFILE, otherwise $USERPROFILE
stays empty.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          mailto:cygwin AT cygwin DOT com
Red Hat, Inc.

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