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?

  • I am not able to create new categories so if someone wants to add a 'compatibility-mode' it would be more appropriate than 'compatibility' – Steve Greatrex Jul 18 '12 at 8:35

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.)
  • Thanks for the suggestion. If possible I'd like to do this without needing to regenerate the manifest so I'll leave the question open to see if anyone else has an alternative suggestion – Steve Greatrex Jul 18 '12 at 12:05
  • No problem, I understand. Also, if you run into an error while compiling, uncomment only line 31. There's an known bug in VS2010. – Matt Jul 18 '12 at 12:07
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


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

  • The application is Deployed using ClickOnce so I don't have acces to the exe path (at least, not consistently) – Steve Greatrex Jul 25 '12 at 18:58
  • I don't know if you could add the information to a .reg file and run that as part of the setup, or modify the registry during setup, or an initialization procedure (check if set, if not, add settings, and quit/re-run program) see stackoverflow.com/questions/1763611/… – SeanC Jul 25 '12 at 19:20
  • Ok, I'll give it a try. Ideally I'd like to achieve this without releasing a new version though, so code/deployment changes are tricky! – Steve Greatrex Jul 25 '12 at 19:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.