IIS6: Changing the Locale ID when Regional Settings Won't Work 

I noticed an awkwardness on my IIS6 server installation today.

All my sites were running with a US locale, thus invalidating the currency/date time/decimal calculations by an order of magnitude.

The problem was that the server was installed using the default settings, and also applied those to the Network Service account under which most of my sites work.

How do you fix this?

  1. Login (RDP is OK)
  2. Change the locale to your preference on the logged in account, use Control Panel's Regional Settings UI, you may need to reboot
  3. Go to HKEY_CURRENT_USER\Control Panel\International
  4. Right click, choose Export
  5. Open the file in Notepad, replace "HKEY_CURRENT_USER" with "HKEY_USERS\S-1-5-20", this is the Network Service account
  6. Save the .reg file
  7. Double click the .reg file and import the settings
  8. Restart IIS

You should have your locale set.

Oh, on the other side, while investigating this, here's a scoop on how to get to clear text passwords of IUSR_MACHINENAME and IWAM_MACHINENAME accounts:

  1. Go to C:\InetPub\AdminScripts and open adsutil.vbs script in Notepad
  2. Change the only occurrence of "IsSecureProperty = True" to "IsSecureProperty = False". Save.
  3. Run "cscript adsutil.vbs get w3svc/anonymoususerpass" in command prompt
  4. Run "cscript adsutil.vbs get w3svc/wamuserpass" in command prompt
  5. Don't forget to revert to "IsSecureProperty = True" in adsutil.vbs
  6. Don't forget to save the file again

You should have both passwords now. This comes handy when you need to fine tune the settings of both built-in accounts.

Categories:  Other | Work
Wednesday, 18 April 2007 12:04:31 (Central Europe Standard Time, UTC+01:00)  #    Comments

 

Wednesday, 18 April 2007 14:51:51 (Central Europe Standard Time, UTC+01:00)
Shouldn't your application be locale-aware? :-)
Sunday, 22 April 2007 07:57:16 (Central Europe Standard Time, UTC+01:00)
Mea culpa. Since one important wasn't (you know, all others are), I had to find this out... :)
Monday, 04 February 2008 22:57:37 (Central Europe Standard Time, UTC+01:00)
Should HKEY\USERS be HKEY_USERS? Or is my brain fried?
Tuesday, 05 February 2008 08:03:30 (Central Europe Standard Time, UTC+01:00)
Peter, you're right. It's a typo, thanks. Corrected.
Wednesday, 29 October 2008 10:47:59 (Central Europe Standard Time, UTC+01:00)
Excellent ... had this locale problem on one of my servers. Your solution worked!
Thanks!
Halldor
Tuesday, 16 December 2008 11:36:42 (Central Europe Standard Time, UTC+01:00)
Thank you Matevž, just what I was looking for!
All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview
Copyright © 2003-2024 , Matevž Gačnik
Recent Posts
RD / MVP
Feeds
RSS: Atom:
Archives
Categories
Blogroll
Legal

The opinions expressed herein are my own personal opinions and do not represent my company's view in any way.

My views often change.

This blog is just a collection of bytes.

Copyright © 2003-2024
Matevž Gačnik

Send mail to the author(s) E-mail