Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SetLocale will not work

Status
Not open for further replies.

thorntonb

Technical User
Nov 8, 2002
55
0
0
IE
Does anyone have any problems setting the regional setting on a PC using the SetLocale method?

I have a bunch of PC's that I need to change the regional settings on to Regional setting English-Ireland. The PC's are presently set to English-US. I have tried manually setting the PC's to English-Ireland and everything works a treat.

I want to write a VBScript to change the regional settings bu am having no luck with this..

I have run the following code to change the settings for testing purposes.....

MsgBox GetLocale ' Returns 1033
SetLocale SetLocale("en-ie")
MsgBox GetLocale ' Returns 6153


But it does not change the locale settings as it should anyone any ideas???

if not is there a way to use rundll32.exe to call intl.cpl so that at least if I can detect that the settings on the PC are US I will be able to launch tihe control Panel CPL so that users can maunal change it themselves?





B-)
 
What is the rest of your script?

I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
I have the same problem.
Is anyone that find a solution.
Thanks in advance
 
Yu can change this by modifying the registry.

Download a copy of a program called RegSnap. Use it to take a snapshot of your registry. Then make a change manually for the localle and take another snapshot. The program will then be able to compare the two snapshots and tell you what changed. Once you have that scripting it is easy.

The localle is set with a number not with the actual text.
You will find the codes that you need in the registry under:

HKCR\MIME\Database\Rfc1766

I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top