IUpdateSession2::put_UserLocale method (wuapi.h)

Gets and sets the preferred locale for which update information is retrieved..

If you do not specify the locale, the default is the user locale that GetUserDefaultUILanguage returns. If the information is not available in a specified locale or in the user locale, Windows Update Agent (WUA) tries to retrieve the information from the default update locale.

This property is read/write.


HRESULT put_UserLocale(
  LCID lcid



Return value



A search from an UpdateSearch object that was created from the UpdateSession object fails if the following conditions are true:

  • A user or a power user set the UserLocale property for the IUpdateSession2 interface to a locale.
  • The locale corresponds to a language that is not installed on the computer.


Minimum supported client Windows XP, Windows 2000 Professional with SP3 [desktop apps only]
Minimum supported server Windows Server 2003, Windows 2000 Server with SP3 [desktop apps only]
Target Platform Windows
Header wuapi.h
Library Wuguid.lib
DLL Wuapi.dll

See also