Ove Kaaven wrote:

> On Sat, 22 Jul 2000, David Elliott wrote:
>
> > As I understand it, Wine currently has a global registry and a user registry.  The
> > global registry gets loaded first, then user settings are loaded on top of that.
> > Any modifications will be written to the user registry and if possible the global
> > registry (which will probably only be possible if you have write access to it, for
> > instance a "wine" account or something like that maybe).
>
> Well, Wine doesn't try to save to the global registry, which is why we
> recommend system administrators to symlink root's user registry to the
> global registry, so it goes there anyway...
>

ACK, run wine as root??  I think that's a bad idea.  I would maybe suggest creating a
wine user account that would be used to administer wine.  The user account should have
write privilidges to the wine global registry and it should be symlinked as you
describe.  That way it would be unnecessary to run wine as root.  Personally,
I *NEVER* run wine as root, and I don't think it's a good idea to suggest it to people
either.

>
> > I would suggest maybe having an HKEY_USERS\.Wine which will load into
> > HKEY_CURRENT_USER first, and then the users settings will be loaded on top of that.
>
> Well, that's probably an option. But I remember that in Win95/98, there
> used to be a setting somewhere in control panel about "share user settings
> by all users" or something like that. What did that setting change? We
> could perhaps borrow from the way that worked...

What that means is that there is only one user HKEY_USERS\.Default.  So
HKEY_CURRENT_USER is always HKEY_USERS\.Default

If you enable multiple user profiles in Win9x, then users each get their own
HKEY_USERS\username key which is copied from .Default when you create a new user.  
Under
Win9x you can still log in as .Default by hitting cancel at the login screen, which is
actually a handy feature since when windows starts and displays the login prompt, it is
essentially logged in as .Default.  Changing the default users theme will change the
login prompts theme.

In Win9X for each user account you can also select which things should use the system
wide (or .Default user) folders, and which things should be personalized.
(Favorites/Desktop/Start Menu, etc.)  Of course in any case the folder location is 
still
stored in HKEY_CURRENT_USER.

I am not 100% sure about this, but I *THINK* that anything you can put in HKCU should
also be able to go in HKLM, and if the HKCU value isn't available, the app should then
check HKLM   I think Juergen mentioned this earlier.  Something about fixing
SHGetSpecialFolder to do this.  I think that the Windows version actually does work 
that
way

I believe that most well-behaved windows apps do this, and that they are supposed to do
this.  According to Marcus though, Diablo 2 directly checks HKCU instead of going
through SHGetSpecialFolder.  I would consider that to be a bug in the application,
especially since it's theoretically possible for an NT admin to put default values in
HKLM and remove them from HKCU for each user.  I mean hell, there's a perfectly good
SHGetSpecialFolder function to do this for you, why query it directly and reinvent the
wheel.  Of course that's a Windows programmer for you.

I am going to do some tests with this in Win98 under Win4Lin and see what happens.  
That
is, I'm going to move some stuff out of HKCU (which is really HKU\.Default and put it 
in
HKEY_LOCAL_MACHINE and see what happens.  If it falls back to HKLM, then I would 
suggest
that we just use HKLM for the fallback settings.  If not, then I would suggest using 
the
HKU\.Wine for fallback settings

-Dave


Reply via email to