Directory c:\%USERPROFILE% created

Thorsten Kampe
Thu Jun 9 15:16:00 GMT 2005

* Systemtechnik (2005-06-09 07:37 +0100)
> 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 ?

Don't use .profile for bash (see man bash > FILES).

Cywin should read all your Windows environment variables. Try
bash -c "set | grep USERPROFILE"

Unsubscribe info:
Problem reports:

More information about the Cygwin mailing list