[wpkg-users] TQ: Why is the LCID of the installing user used?

Rainer Meier r.meier at wpkg.org
Mon Jul 18 23:33:21 CEST 2011


Hi Stefan,

On 18.07.2011 23:17, Stefan Pendl wrote:
> I just noticed that the getLocale() function retrieves the language setting of the installing user.
> Usually this is the SYSTEM user, so this might not have an impact in most environments.
>
> Wouldn't it be better to use the setting of the system?

This is a very valid question. Moreover changing to HKLM would be quite a 
trivial change. However I barely remember that this discussion was held already 
on the mailing list some when in the past.

If I remember correctly the HKLM key was not available on all systems or 
contained the wrong values on systems with multi-language extensions installed 
while the HKCU key always clearly provided the system locale.

Unfortunately I don't have time now to dig for the reasons again. Maybe somebody 
remembers...

It might also be related that the "CurrentControlSet" is actually a "link" which 
is in some cases not available or might switch to different configurations.

One clear reason is that user notifications could be sent to the user by WPKG. 
These notifications either use the system locale (which is usually identical to 
the service user) or when WPKG is run in user context (Win 9x or to deploy 
user-settings in NT series) it can display all messages using the current user 
locale.
So in most cases using HKCU does not suffer from any disadvantages as in system 
context it is identical to the machine locale but in rare cases where WPKG is 
run in user context (yes, there seem to be users out there doing this) it can 
present messages in user-preferred language.

Up to now it seems to work pretty well using the user locale.

But I am very open to discuss it on the list.


> I apologize in advance, if I am beating a dead horse.

I hope you're not referring to WPKG as being a "dead horse" ;)
It's ALIVE!

br,
Rainer



More information about the wpkg-users mailing list