delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/06/09/08:04:40

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
Mime-Version: 1.0 (Apple Message framework v622)
Message-Id: <ec453c77b57098b626e652d467d9617d@kreisbote.de>
To: Cygwin Newsgroup <cygwin AT cygwin DOT com>
From: Systemtechnik <technik AT kreisbote DOT de>
Subject: Directory c:\%USERPROFILE% created
Date: Thu, 9 Jun 2005 08:37:56 +0200
X-IsSubscribed: yes
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id j59C4dUt017062

Hello,

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.

I found out that if i start a command-shell from windows there is an 
environment variable called "%USERPROFILE%" which
points to the current logged in users directory. In cygwin-shells this 
variable is missing.

So everytime a windows-process tries to access the current users 
profile-dir (to store some ini's or whatever),
the variable does not resolve but will be taken literal, so this 
directory will be created.
In other words: %USERPROFILE% does not point to 
"c:\WINNT\Profiles\username", resp. "%SystemRoot%\Profiles\username" 
like it should.
The effect is that the installer will fail, which is very bad if 
running "silent" setups.

To avoid this i've set $USERPROFILE to the appropriate 
profile-directory for the users in his .profile in cygwin's 
/home/username.
This seems to work, but do i make something wrong ? Is there a better 
way to do this ?
Are there any environment-variables or programs to resolve the current 
users Windows-Profile-Directory, instead of setting
it literally in .profile ?


Regards,

Oliver Geisen
---------------------------------------
Systemadministrator
Kreisboten Verlag Mühlfellner KG
Telefon: 0881/686-63
Telefax: 0881/686-74
Mail: technik AT kreisbote DOT de
---------------------------------------

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