Re: Directory c:\%USERPROFILE% created

2005-06-13 Thread Corinna Vinschen
On Jun 13 16:48, Oliver Geisen wrote:
> >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.
> "empty" or "not set" ?
> 
> Are you shure you mean $USERNAME in the sense of users login name, or 
> users SID ?

I meant the SID, sorry.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  mailto:cygwin@cygwin.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/



Re: Directory c:\%USERPROFILE% created

2005-06-13 Thread Oliver Geisen

Hi,

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.

"empty" or "not set" ?

Are you shure you mean $USERNAME in the sense of users login name, or 
users SID ?


In "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList\" on 
my NT4-WS are many folders like

"S-1-5-21-1570706540-1911978263-1210191635-1007/", and so on.

In there is a ProfileImagePath key which contains 
"%SystemRoot%\Profiles\admin".

$SYSTEMROOT points to "C:\WINNT" in my ssh-shell.


Mit freundlichen Grüssen,

Oliver Geisen
---
Systemadministrator
Kreisboten Verlag Mühlfellner KG
Telefon: 0881/686-63
Telefax: 0881/686-74
Mail: [EMAIL PROTECTED]
---


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



Re: Directory c:\%USERPROFILE% created

2005-06-13 Thread Corinna Vinschen
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@cygwin.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/



Re: Directory c:\%USERPROFILE% created

2005-06-13 Thread Oliver Geisen

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.

Thanks,

Oliver Geisen
---
Systemadministrator
Kreisboten Verlag Mühlfellner KG
Telefon: 0881/686-63
Telefax: 0881/686-74
Mail: [EMAIL PROTECTED]
---


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



Re: Directory c:\%USERPROFILE% created

2005-06-09 Thread Thorsten Kampe
* 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:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: Directory c:\%USERPROFILE% created

2005-06-09 Thread Igor Pechtchanski
On Thu, 9 Jun 2005, Systemtechnik wrote:

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

Since you didn't attach the output of "cygcheck -svr" as requested in
, this is just a guess.  Your problem
isn't with %USERPROFILE% per se, it's with some other variable (usually
%HOME%) that contains "%USERFPROFILE%" in it.  The environment is stored
in the registry, and there is a special REG_EXPAND_SZ value type that
causes any embedded variable references to be expanded when referenced.
Variables that refer to other variables usually have that value type.
Some buggy installation programs change the type of that value to REG_SZ
(a regular non-expandable string), and therefore, when the value is read,
the string "%USERPROFILE%" remains a literal string (i.e., isn't
expanded).

You need to look through your environment and see what variables contain
the string %USERPROFILE%.  You then need to go to the environment key in
the registry, rename the values that have wrong types, and re-create them
with the correct REG_EXPAND_SZ type.  This isn't a Cygwin problem, but
rather one exposed by Cygwin, since it uses the values of the variables to
find out which path to use for $HOME (and creates that directory).

HTH,
Igor
-- 
http://cs.nyu.edu/~pechtcha/
  |\  _,,,---,,_[EMAIL PROTECTED]
ZZZzz /,`.-'`'-.  ;-;;,_[EMAIL PROTECTED]
 |,4-  ) )-,_. ,\ (  `'-'   Igor Pechtchanski, Ph.D.
'---''(_/--'  `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"The Sun will pass between the Earth and the Moon tonight for a total
Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT

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



Re: Directory c:\%USERPROFILE% created

2005-06-09 Thread Corinna Vinschen
On Jun  9 08:37, Systemtechnik wrote:
> 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.

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.


Corinna

-- 
Corinna Vinschen  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader  mailto:cygwin@cygwin.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/



Directory c:\%USERPROFILE% created

2005-06-08 Thread Systemtechnik

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: [EMAIL PROTECTED]
---

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