Version 13 of HOMEPATH

Updated 2003-10-28 17:37:46

On a Windows system, the path: D:\ is known as the HOMEPATH.


LV Can anyone explain how Tcl makes use of this? What does HOMEPATH mean? - RS is not sure, but this page was prepared to live from Tcl syntax help.


On my windows box my HOMEPATH is:

 \Documents and Settings\jrankin

I'm not sure why it would ever be the root of d, unless it has been explicitly set that way. Given the location of this path, perhaps it refers to the Windows equivalent of the user's home directory? - WJR


ZLM:

   C:\>set HOME
   HOMEDRIVE=P:
   HOMEPATH=\
   HOMESHARE=\\acefpscpd001\PSI0005JLM$
   C:\>p:
   P:\>
   P:\>cd %HOMEPATH%
   P:\>
   P:\>c:
   C:\>
   C:\>cd %HOMEPATH%  
   C:\>

BR 2003-10-28: On my system (W2K) I see this:

  c:\> set HOME
  HOMEDRIVE=C:
  HOMEPATH=\Documents and Settings\benny

I always interpreted this as that MS wanted something like $HOME on Unix but in two pieces so that you can use it in batch files like

  %HOMEDRIVE%
  cd %HOMEPATH%

Note for those not familiar with Windows command/batch language: On Windows, plain CD doesn't change the drive. You do that by just giving the drive name, as the first line in the code example does.

Tcl seems to think the same, it synthesizes a HOME variable for me from those bits, if I don't have one:

  c:\> set HOME
  HOMEDRIVE=C:
  HOMEPATH=\Documents and Settings\benny

  c:\> tclsh
  % set env(HOME)
  C:\Documents and Settings\benny

TV XP SP1 gives:

 HOMEDRIVE=D:
 HOMEPATH=\Documents and Settings\someinstallinheritedname
 SystemDrive=D:
 SystemRoot=D:\WINDOWS

cygwin on that sys (the most recent on , complete install) gives:

 HOMEDRIVE=D:
 HOMEPATH='\Documents and Settings\someinstallinheritedname'
 KDEHOME=/home/someinstallinheritedname/.kde2
 PWD=/home/theo
 SYSTEMDRIVE=D:
 SYSTEMROOT='D:\WINDOWS'
 USER=theo
 USERNAME=theo
 USERPROFILE='D:\Documents and Settings\someinstallinheritedname'
 WINDIR='D:\WINDOWS'

Under cygwin, like on unix, you have a 'mount' command, where you can chose to mount to:

  • a relative dir (probably not handy unless you want independent partion file trees with overlapping dirs)
  • something like /bin , which refers usually to the c:/cygwin/bin or /cygdrive/<currentpartition>/cygwin/bin
  • drive defined path /cygdrive/c/cygwin/bin

Within cygwin, apart from using 'mount /cygdrive/c/ c:' you can hard define the partition not by D:/ but by /cygdrive/d/ .

Cygwin can also have stored variables in the registry, which seem to be tagged by cygwin or cygnus, but I'm not sure all could be found that way.

Setting variables under the cygwin unix emulation is done by the export instead of set command, and can be automatically set at startup by /etc/profile and just before bash shows the prompt by ~/.bashrc (unfortunately with the tilde interpreted by some variable I don't know, and which is by default linked with the windows login name.


[Category ?]