3

I have an application that is deployed and installed using ClickOnce Deployment and on certain machines (mostly running Windows 7) I need to be able to disable Aero themes and possibly change other Compatibility Mode settings.

Right click -> Properties does not show the Compatibility tab...

enter image description here

... and the application is not listed in the Program Compatibility wizard in Control Panel.

Is there any other way to set up Compatibility Mode?

2 Answers2

2

I don't think that there is a way to natively disable visual themes during deployment, but this will enable the compatibility tab:

  1. Open your project and go to the solution explorer.
  2. If not already, enable the "Show All Files" setting (a button near the top of the Solution Explorer window that has an icon with three files on it).
  3. Open your App.manifest file and go to this section: enter image description here
  4. Uncomment lines 31, 35, and 46.
  5. You should now be able to select compatibility mode (after rebuilding, of course.)
Matt
  • 409
1
reg.exe Add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" /v "C:\Program Files\YouInstallFolder\YourProgram.exe" /d"DISABLEDWM HIGHDPIAWARE"

(note: 32 bit app on an x64 system: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AppCompatFlags)

Disable desktop composition DISABLEDWM
Disable display scaling on high DPI settings HIGHDPIAWARE

Also:

Run as Administrator RUNASADMIN
Windows 95 Mode WIN95
Windows 98 / Windows Me Mode WIN98
Windows NT 4.0 (Service Pack 5) Mode NT4SP5
Windows 2000 WIN2000
Windows XP (Service Pack 2) Mode WINXPSP2
Windows Server 2003 (Service Pack 1) WINSRV03SP1

There may be more - I can't seem to find a definitive list

SeanC
  • 3,804