Link to home
Start Free TrialLog in
Avatar of vand
vand

asked on

Batch File to turn off "detect language automatically" Office XP

I need a batch file, or the registry location of the setting that turns off "automatically detect language" in the language settings for Office XP.
Avatar of scampgb
scampgb
Flag of United Kingdom of Great Britain and Northern Ireland image

Hi vand,

The registry subkey that you're looking for would seem to be HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Common\LanguageResources

This subkey contains a number of Locale IDs (LCID), and a key called "InstallLanguage" that contains one of the LCIDs
For example, English (US) would be 1033

You can get the LCID list from http://www.microsoft.com/globaldev/reference/lcid-all.mspx

The article http://www.microsoft.com/resources/documentation/office/xp/all/reskit/en-us/intb04.mspx explains how to customise this.  It would also be worthwhile looking at http://support.microsoft.com/default.aspx?scid=kb;en-us;309123&sd=tech which explains how to customise it when you're deploying Office.


I've not been able to test this, but something like the following should do the trick.  I'm assuming you want to use Traditional Spanish (1034) :-)

@echo off
echo Windows Registry Editor Version 5.00>c:\language.reg
echo.>>c:\language.reg
echo [HKEY_CURRENT_USER\Software\Microsoft\Office\10.0\Common\LanguageResources]>>c:\language.reg
echo "1034"="On">>c:\language.reg
echo "InstalledLanguage"="1034">>c:\language.reg
regedit -s c:\language.reg
del c:\language.reg


Does that help?
Avatar of vand
vand

ASKER

Thank you for the quick response! I will be at the client site on 9/24/04 and will test it then!
vand - pleasure :)
Best of luck with it.  It's a bit theoretical as I've not done it myself, but it seems to make sense based on my own installations.
Let me know how you get on.


Avatar of vand

ASKER

A quick look at the links seems to be more related to changing the default language. What I need is a way to turn of "automatically detect language" in the language settings!

I actually need US English (1033) :) for some reason the users are getting prompted for the office CD so that cheese eating surrender monkey (french), German and Italian languages can be installed everytime you run a spell check! If you comply (instead of canceling) and insert the cd, your whole document turns red and all the suggested fixes are in cheese eating surrender monkey (french)! The fix I found was to change the default language back to English and UN check "auto detect language" if you don't UN check auto detect the problem stays despite the default language.

To make matters worse this problem is in the image, so there are about 300 PCs with this problem, hence the need for a batch file!
... et quel est le problème avec le Français ? ;-)

Info from http://www.microsoft.com/resources/documentation/office/xp/all/reskit/en-us/intb04.mspx ....
Instead of letting Office create the LanguageResources subkey, you can set language settings in the Custom Installation Wizard and deploy them as part of your Office XP installation. If Office detects that the language settings are already defined (in the LanguageResources subkey), Office will not override the existing settings when an Office application starts for the first time.

I took this to mean that if it's defined in the registry (as above), then it won't bother trying to change language.
It's worth a go anyway.
Avatar of vand

ASKER

Another quick note, the refrenced reg location HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\LanguageResources has the correct 1033 for installlanguage and previousinstalllanguage, I did get that far in trouble shooting last week, but, I will verify that and try your batch file on Friday.
Avatar of vand

ASKER

I'll let you know one way or the other on Friday, I know I hate having to wait for feedback! Thanks again.
vand, No problems about the waiting - the important thing is that the problem gets solved :-)

Thanks for proving updates though - otherwise the question can end up being classed as abandoned, and that's no fun.

If it doesn't work, I'll hunt around a little more - now that I know it's a problem specifically when running a spell check.
Also, does it happen every time Word is run - or just the first time?

Avatar of vand

ASKER

Just with spell check. The fix did not work. I did verify the registry and the correct language is set. For some reason spell check wants to check in those other languages unless I turn of "Auto detect" in the language settings!
Hmm - sorry that the script I did didn't work.
I'm afraid I'm out of ideas on this one :-(
Avatar of vand

ASKER

I'll keep looking and post if I find an automated way to turn this off.
Avatar of vand

ASKER

Ok I'm getting closer I've found an ADM that controls it by adding HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\11.0\Word\Options\vpref
and the entry
fLangAutoDetect_1520_1
0= off
and 1=on
SO, since I can't use the adms because the users are in a workgroup, how do I use this info to make a batch or vb script?
ASKER CERTIFIED SOLUTION
Avatar of vand
vand

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Aha!  Glad you found the key - I couldn't see it anywhere!

Your batch file would become:
@echo off
echo Windows Registry Editor Version 5.00>c:\language.reg
echo.>>c:\language.reg
echo [HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\11.0\Word\Options\vpref] >>c:\language.reg
echo "fLangAutoDetect_1520_1"="dword:00000000" >>c:\language.reg
regedit -s c:\language.reg
del c:\language.reg
vand,
I just noticed, your post has REGEDIT4 in it - are your PCs running WinNT or something more recent?
Avatar of vand

ASKER

They are all xp, but the file did not work untill I added it.  The reg file actually creates the key, It does not appear to be in the registry by default.
Avatar of vand

ASKER

Thank you for your time. I'm going to use the reg file I created and just have a batch file call the file to apply it. I've asked the powers that be to close this question and refund my points. Thanks for trying!

VanD.
Sorry that I couldn't help.  Best of luck with it :-)
Hi CetusMOD,
No probs :-)