High Contrast Mode stuck on in Windows Vista


We recently ran into a problem at with a few kids at school who had ‘accidentally’ activated High Contrast Mode in Vista by accidentally pressing Shift+Alt+PrtScrn, and couldn’t turn it off again. I say ‘accidentally’ because we’ve recently seen kids doing this to each other deliberately as this month’s Favourite Game of the Month™ (previous winners of Favourite Game of the Month™ include using a hotkey to rotate the screen so it is upside down, and vandalising Wikipedia).

High Contrast Mode is an accessibility feature in Windows that causes the desktop theme to switch off of Aero (or whatever is currently set) onto an almost completely black scheme with white text. It also disables the desktop wallpaper and changes the background colours of applications like Word to black, so it appears the user is typing white text onto black paper.

Despite repeated use of the Shift+Alt+PrtScrn shortcut, High Contrast Mode refused to turn off. Their desktop wallpaper did return, indicating that it was trying to switch out of High Contrast Mode, but not fully succeeding. Our students tend to have much of the Control Panel locked down (as I outlined above, the little bastards cherubs like to fiddle and break things), so the Control Panel applet to turn this off was not available to them, but even making it available and using the applet did not work.

I couldn’t find any mention of this via Google, and so it took me a little while to work out what was going on. I eventually traced this problem to an incorrect setting in the Registry. Here’s what my Vista laptop has set when High Contrast is activated:

[HKEY_CURRENT_USER\Control Panel\Accessibility\HighContrast]
"Flags"="126"
"High Contrast Scheme"=""
"Previous High Contrast Scheme MUI Value"=""
"Pre-High Contrast Scheme"="C:\Windows\resources\themes\Aero\Aero.msstyles"
"Pre-High Contrast Color"="NormalColor"
"Pre-High Contrast Size"="NormalSize"
"Pre-High Contrast Wallpaper"="C:\Users\JSCHLA~1\AppData\Local\Temp\BGInfo.bmp"

As you can see, this key records what the desktop scheme was set to before I switched to High Contrast Mode, in the “Pre-High Contrast Scheme” value.

Now let’s look at the registry of a user with the problem:

[HKEY_USERS\S-1-5-21-1708537768-2052111302-682003330-9422\Control Panel\Accessibility\HighContrast]
"Flags"="127"
"High Contrast Scheme"="High Contrast Black"
"Previous High Contrast Scheme MUI Value"="High Contrast Black"
"Previous High Contrast Scheme MUI Ptr"="@themeui.dll,-852"
"Pre-High Contrast Scheme"="@themeui.dll,-852"
"Pre-High Contrast Color"=""
"Pre-High Contrast Size"=""
"Pre-High Contrast Wallpaper"="C:\Users\BEN~1.KOL\AppData\Local\Temp\BGInfo.bmp"

As you can see there are a number of differences, but those of you paying attention will have immediately noticed the most pertinent discrepancy; this user’s “Pre-High Contrast Scheme”. Instead of the path to the Aero style file, it lists the previous scheme as “@themeui.dll,-852″. This is a direction to Windows to extract a string resource from a dll file and use that value as the theme. On an English Vista system, “@themeui.dll,-852″ contains the text string “High Contrast Black”. This means that when the user tries to deactivate High Contrast Mode, the scheme it reverts to is… the one used by High Contrast Mode.

How this happened is, so far, a mystery to me.

I corrected it using the following steps:

  1. Ensure user is logged on and in ‘true’ High Contrast mode, by checking if their wallpaper appears. If there is no wallpaper, they are in High Contrast mode. If they are not, use the keyboard shortcut (Shift+Alt+PrtScrn) to switch it on.

  2. Edit the user’s registry to set:

    HKEY_CURRENT_USER\Control Panel\Accessibility\HighContrast
    "Pre-High Contrast Scheme"="C:\Windows\resources\themes\Aero\Aero.msstyles"

    If RegEdit is prohibited for the user, either use Remote Registry, or create a shortcut to RegEdit on the desktop and use ‘Run as Administrator’, then set the same value under HKEY_USERS\SID-Of-User\Control Panel\Accessibility\HighContrast, substituting SID-Of-User for the SID of the user with the problem.

  3. Use the keyboard shortcut again to switch out of High Contrast Mode. Theme should switch back to Aero.

  4. Dance the happy dance of success (Optional).

  5. Find child who turned High Contrast on as a joke and beat savagely with keyboard (Mandatory).

Hopefully that will help anyone with the same problem; I was getting surprising and unusual amount of stick from the kid’s teacher for “not fixing the problem” that was partly caused by a user, and partly (I presume) a bug in Vista. Such is life when you work IT Support; even if the user was completely responsible, it’s still your fault that it’s not fixed within minutes.

,

  1. #1 by ladyspice on 2 December, 2007 - 8.07 pm

    You should trade places with an RMWC IT person for a month. When you get back, your school will be much more grateful for you and some sort of ANYTHING will be running correctly at RMWC.

  2. #2 by Anonymous on 4 December, 2007 - 5.59 pm

    Consider this saved and (eventually) printed off for future use at work. If we ever do use Vista. Horrors!

  3. #3 by Jay on 4 December, 2007 - 10.04 pm

    See, I hear this a lot, and it’s honestly unfounded. There is nothing intrinsically wrong with Vista. It has it’s bugs, but SP1 is going into beta this month and I’m betting a lot of things will be ironed out with that.

    About 1/3 of our staff use Vista on their laptops and have no more problems than the XP users. All my own computers now run Vista with practically zero problems. It’s certainly not worth the average user upgrading old machines (though I upgraded my desktop), but new machines designed and specified for Vista by the manufacturer are fine.

(will not be published)