Directory c:\%USERPROFILE% created

Corinna Vinschen
Mon Jun 13 14:49:00 GMT 2005

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 Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader
Red Hat, Inc.

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list