Recently I’ve seen more Office 2010 at the work place and I noticed that the same technique for disabling the proofing tools I used in my last article for 2007 did not cut it. Microsoft put an even more impervious anti-corruption techniques in place, putting an end to my breakage of the proofing files hoping it wouldn’t complain. At last I found a solution:
Usage: ToggleProof.exe “path\to\ntuser.dat\file”
Example (Win7): ToggleProof1.exe “c:\users\mike\ntuser.dat”
Example (Win XP): ToggleProof1.exe “c:\documents and settings\mike\ntuser.dat”
Important Notes: Must be run from administrator account. Targeted account must have opened Word at least once (it will still work, but not fully as some auto-correct features must be initiated in the registry first). Targeted account can not be logged on while running this. This toggles proofing on/off and will not affect other accounts. This disables the options menu/auto-correct/thesaurus/grammar.
Tips: If using this and you need an easy way to toggle proofing, simply make a shortcut to ToggleProof.exe and right-click the shortcut and select properties. From there you can append the location of the ntuser.dat (in quotes) to the target field. Then all you have to do from there on in is click that shortcut to toggle whether or not proofing is on.
- Added extra restrictions where needed as reported by Craig/Tester and B.G. Arets
Additional Information / Making Of
My office 2007 article for disabling proofing was a simple hack. I renamed msproof6.dll (controls all proofing), then when I noticed Office install came up to repair that missing file, I simply also renamed that setup file. It never complained after that and proofing was gone.
Office 2010 employed a better technique. Using the same idea of renaming the dll and setup exe resulted in a third, much harder msi check/reinstall program. Only way to get around that would be to modify the C:\Windows\Installer directory which can easily break stuff making toggle difficult.
Proofing Folder Hack
My tool does not use a hack but this may be useful to others. I noticed that there was a Proof folder under Program Files\Microsoft Office\Office14. The proof file had LEX files (word dictionaries) named the following:
Also worth noting – EN is for the english locale. You will also see FR (french) and ES (spanish). Here’s a full listing.
Replacing those LEX files with an empty LEX would disable those functions without impacting the program or setting off an alarm. There is a French LEX file by default (for GR – Grammar) that is only 1KB which I replaced SP/HY/TH with to disable other features. Adjusting the Grammar LEX would crash the program however, as half the code is part of the DLL’s beneath the Proof folder.
To disable Grammar in my ‘hack’ version I simply put in a blank DLL (even just rename a text file to that DLL name). Disgusting, I know. Only issue was, in some cases Office would believe Proofing was not installed, and would prompt the user to reinstall it (only once), and after a quick progress bar, it would go away (proofing still being disabled).
The Proper Way
There is a much better way, and that is by group policy. However there were snags there too… First off, Microsoft has the group policies available for download and integration with your desktop or AD here, which also contains a listing of everything in a handy excel file. I found the installation details for what to do with the ADML/ADMX files for this in this Microsoft Article. Once done, I had a group policy editor with (almost..) every setting available.
Only little snag I had, there is NOTHING which turns of Auto Capitalization ‘at the beginning of a table or cell’ under the auto formatting in Word Options. The only way around this is to modify HKCU\Software\Microsoft\Office\14.0\Word\Data manually. This is a nice big binary value. Fun stuff!.. Using comparison software, I checked the value on/off and compared two registry exports. My code writes six 0’s disabling this. This is the only reason why word must be started at least once if made on a new user account before running the proofing tool. If not run once, word will initialize new values over this. I also didn’t want to write an entire pre-saved value in the odd case that it sets other defaults to something else or breaks office for people with slightly different versions.
I have no idea why they didn’t include a policy for that.. I came across a lot of mad admins wondering why capitalization was still going on (they disabled ‘capitalize the beginning of sentences’, but for each new line, that’s not the same thing, thats the ‘capitalize beginning of table or cell’!).
For disabling the ribbon buttons I used a combination of the Group Policies and the documents from Microsoft Containing Control ID’s (Office 2007, Office 2010). This has a listing of all controls, EXCEPT for the options menu within File — a critical piece as any user would be able to re-enable proofing. Wondering if there was an option I developed an autoit to disable a wide range of values, then did a basic binary search method to find it (see below).
#RequireAdmin RegDelete("HKCU\Software\Policies\Microsoft\office\14.0") For $i = 11322 to 11325 RegWrite("HKCU\Software\Policies\Microsoft\office\14.0\word\disabledcmdbaritemslist", "TCID" & $i, "REG_SZ", $i) Next
Turns out the value was 11323 (as you can see in the above code as I narrowed I stopped around 11322/11325.
Upon searching for that value I found an extremely helpful article by ‘acsheehy’ who already did this whole idea in 2007 (and I was able re-use the control ID’s and key ID’s which carried over to this program).