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, April 18, 2007 12:04:31 PM (Central Europe Standard Time, UTC+01:00)  #    Comments


Wednesday, April 18, 2007 2:51:51 PM (Central Europe Standard Time, UTC+01:00)
Shouldn't your application be locale-aware? :-)
Sunday, April 22, 2007 7:57:16 AM (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, February 4, 2008 10:57:37 PM (Central Europe Standard Time, UTC+01:00)
Should HKEY\USERS be HKEY_USERS? Or is my brain fried?
Tuesday, February 5, 2008 8:03:30 AM (Central Europe Standard Time, UTC+01:00)
Peter, you're right. It's a typo, thanks. Corrected.
Wednesday, October 29, 2008 10:47:59 AM (Central Europe Standard Time, UTC+01:00)
Excellent ... had this locale problem on one of my servers. Your solution worked!
Tuesday, December 16, 2008 11:36:42 AM (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.
Home page

Comment (HTML not allowed)  

Enter the code shown (prevents robots):

Live Comment Preview
Copyright © 2003-2024 , Matevž Gačnik
Recent Posts
RSS: Atom:

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