Per user dirs on Non-Unix platforms (was Re: [Python-Dev] Where to install non-code files)
Gordon McMillan
gmcm@hypernet.com
Tue, 30 May 2000 11:29:39 -0400
Fred L. Drake wrote:
> Now that this idea has fermented for a few days, I'm inclined
> to not
> like it. It smells of making Unix-centric interface to something
> that isn't terribly portable as a concept.
I've refrained from jumping in here (as, it seems, have all the
Windows users) because this is a god-awful friggin' mess on
Windows.
From the 10**3 foot view, yes, they have the concept. From
any closer it falls apart miserably.
In practice, I think you can safely regard a Win9x box as
single user. I do sometimes run across NT boxes that mutiple
people use, and have separate configurations. It sort of works,
sometimes.
But there's no $HOME as such.
There's
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\S
hell Folders with around 16 subkeys, including AppData
(which on my system has one entry installed by a program I've
never used and didn't know I had). But MSOffice uses the
Personal subkey. Others seem to use the Desktop subkey.
Still other programs will remember the per-user directories
under HKLM\....\<program specific> with a subkey == userid.
That said, the above referenced AppData is probably the
closest thing to a $HOME directory, despite the fact that it
smells, tastes, acts and looks nothing like the *nix
counterpart.
(An cmd.exe "cd" w/o arg acts like "pwd". I notice that the
bash shell requires you to set $HOME, and won't make any
guesses.)
- Gordon